diff --git a/code/frontend/src/components/TextArea.js b/code/frontend/src/components/TextArea.js new file mode 100644 index 0000000..75508be --- /dev/null +++ b/code/frontend/src/components/TextArea.js @@ -0,0 +1,22 @@ +import React from "react" +import Style from "./TextArea.module.css" +import classNames from "classnames" + + +/** + * A multiline text field which can optionally be resized. + * + * @param resize - `true` if the resizing the textarea should be allowed, `false` otherwise. + * @param children - The value of the ` + ) +} diff --git a/code/frontend/src/components/TextArea.module.css b/code/frontend/src/components/TextArea.module.css new file mode 100644 index 0000000..d0391a8 --- /dev/null +++ b/code/frontend/src/components/TextArea.module.css @@ -0,0 +1,32 @@ +.TextArea { + /* Remember the margin! */ + height: calc(100% - 4px); + width: calc(100% - 4px); + + border-radius: 25px; + border-width: 0; + + min-height: 28px; + padding: 10px 20px; + margin: 2px; + + color: var(--fg-field-off); + background-color: var(--bg-field-off); + + font-family: var(--font-regular); +} + +.TextArea:focus { + outline: 0; + + color: var(--fg-field-on); + background-color: var(--bg-field-on); +} + +.TextAreaResizable { + resize: vertical; +} + +.TextAreaNoResize { + resize: none; +} \ No newline at end of file