aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/ErrorMessage.tsx25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/components/ErrorMessage.tsx b/src/components/ErrorMessage.tsx
new file mode 100644
index 0000000..f807817
--- /dev/null
+++ b/src/components/ErrorMessage.tsx
@@ -0,0 +1,25 @@
+/** @jsx jsx */
+import { jsx, css } from "@emotion/react";
+import colors from "../colors";
+
+interface ErrorMessageProps {
+ show: boolean,
+ message: string
+}
+
+const styles = css`
+ color: ${colors.error};
+ font-size: 20px;
+ line-height: 15px;
+ margin: 10px 0 0;
+`;
+
+export default function ErrorMessage(props: ErrorMessageProps): JSX.Element|null {
+ if (!props.show) {
+ return null;
+ }
+
+ return (
+ <p css={styles}>{props.message}</p>
+ );
+}