File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ /** @jsx jsx */
2+ import { css , jsx } from "@emotion/react" ;
3+ import styled from "@emotion/styled" ;
4+
5+ interface PrecheckProps {
6+ severity : "secondary" | "warning" | "danger"
7+ message : string
8+ }
9+
10+ const BACKGROUNDS = {
11+ secondary : "#7e7c7cff" ,
12+ warning : "#a09b53ff" ,
13+ danger : "#b4747aff"
14+ }
15+
16+ interface PrecheckBoxProps {
17+ severity : PrecheckProps [ 'severity' ]
18+ }
19+
20+
21+ const HeaderBox = styled . div < PrecheckBoxProps > `
22+ margin-bottom: 2rem;
23+ padding: 1rem 4rem;
24+ border-radius: 8px;
25+ text-align: center;
26+ font-size: 1.5rem;
27+ font-weight: bolder;
28+
29+ background-color: ${ props => BACKGROUNDS [ props . severity ] } ;
30+
31+ @media (max-width: 500px) {
32+ padding: 1rem 1.5rem;
33+ }
34+ ` ;
35+
36+ function PrecheckBox ( props : PrecheckProps ) : JSX . Element {
37+ return < HeaderBox severity = { props . severity } >
38+ { props . message }
39+ </ HeaderBox > ;
40+ }
41+
42+ export default PrecheckBox ;
You can’t perform that action at this time.
0 commit comments