diff options
author | 2022-07-01 13:41:48 +0400 | |
---|---|---|
committer | 2022-07-01 13:41:48 +0400 | |
commit | 9696f5269ddbc1ba090830f84cb17ac6624c777f (patch) | |
tree | 8e761de37294f336c7f6207cee7c9e54fae0f86b /src/components/Question.tsx | |
parent | Style Changes (diff) |
Improve ErrorMessage Interface
Unify the string and element types on the interface to clarify they are
mutually exclusive.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'src/components/Question.tsx')
-rw-r--r-- | src/components/Question.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/Question.tsx b/src/components/Question.tsx index b42ea09..d4883ec 100644 --- a/src/components/Question.tsx +++ b/src/components/Question.tsx @@ -252,7 +252,7 @@ class RenderedQuestion extends React.Component<QuestionProp> { } const element = <div css={css`white-space: pre-wrap; word-wrap: break-word;`}>{inner}</div>; - return <ErrorMessage show={!valid} message={""} innerElement={element}/>; + return <ErrorMessage show={!valid} content={element}/>; } render(): JSX.Element { @@ -323,7 +323,7 @@ class RenderedQuestion extends React.Component<QuestionProp> { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const message: string = this.props.public_state.get("error"); - error = <ErrorMessage show={!valid} message={message}/>; + error = <ErrorMessage show={!valid} content={message}/>; } return <div ref={this.props.scroll_ref}> |