blob: 3342434a14bd9f4bc2ff87bfc8780658666c2748 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/** @jsx jsx */
import { jsx, css } from "@emotion/react";
import colors from "../colors";
interface ErrorMessageProps {
show: boolean,
message: string
}
export default function ErrorMessage(props: ErrorMessageProps): JSX.Element | 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>
);
}
|