From df4cac518827b69977cdb156394abb399ef64871 Mon Sep 17 00:00:00 2001 From: ks129 <45097959+ks129@users.noreply.github.com> Date: Mon, 18 Jan 2021 11:35:00 +0200 Subject: Display invalid information for TextArea --- src/components/InputTypes/TextArea.tsx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/InputTypes/TextArea.tsx b/src/components/InputTypes/TextArea.tsx index 40547bb..a09ce8a 100644 --- a/src/components/InputTypes/TextArea.tsx +++ b/src/components/InputTypes/TextArea.tsx @@ -2,10 +2,14 @@ import { jsx, css } from "@emotion/react"; import React, { ChangeEvent } from "react"; import { textInputs } from "../../commonStyles"; +import ErrorMessage from "../ErrorMessage"; +import colors from "../../colors"; interface TextAreaProps { handler: (event: ChangeEvent) => void, - required: boolean + required: boolean, + valid: boolean, + error: string } const styles = css` @@ -17,6 +21,18 @@ const styles = css` padding: 1rem; `; +const invalidStyles = css` + .invalid-box { + box-shadow: 0 0 10px ${colors.error}; + border: none; + } +`; + export default function TextArea(props: TextAreaProps): JSX.Element { - return