aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/ErrorMessage.tsx17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/components/ErrorMessage.tsx b/src/components/ErrorMessage.tsx
index 982bdb9..3342434 100644
--- a/src/components/ErrorMessage.tsx
+++ b/src/components/ErrorMessage.tsx
@@ -7,17 +7,14 @@ interface ErrorMessageProps {
message: string
}
-const styles = css`
- color: ${colors.error};
- font-size: 1.15rem;
- line-height: 1.1rem;
- margin: 1rem 0 0;
-`;
-
export default function ErrorMessage(props: ErrorMessageProps): JSX.Element | null {
- if (!props.show) {
- return null;
- }
+ const styles = css`
+ color: ${colors.error};
+ font-size: 1.15rem;
+ line-height: 1.1rem;
+ margin: 1rem 0 0;
+ visibilty: ${props.show ? "visible" : "hidden"}
+ `;
return (
<p css={styles}>{props.message}</p>