File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ import styled from "@emotion/styled" ;
2+ import React , { ReactNode } from "react" ;
3+ import { BlackButton } from "./style/global-style" ;
4+
5+ interface Props {
6+ coverImage ?: string ;
7+ content : ReactNode ;
8+ buttonText : string ;
9+ onClick : ( ) => void ;
10+ }
11+
12+ export function CommingSoonTemplate ( props : Props ) {
13+ return (
14+ < Wrapper >
15+ { props . coverImage && (
16+ < ImageBox >
17+ < Image src = { props . coverImage } />
18+ </ ImageBox >
19+ ) }
20+
21+ < Content hasImage = { ! ! props . coverImage } > { props . content } </ Content >
22+ < ButtonWrapper >
23+ < Button onClick = { props . onClick } > { props . buttonText } </ Button >
24+ </ ButtonWrapper >
25+ </ Wrapper >
26+ ) ;
27+ }
28+
29+ const Wrapper = styled . div `
30+ /* -8 is for reset body margin */
31+ margin: 0 -8px;
32+ ` ;
33+
34+ const ImageBox = styled . div `` ;
35+
36+ const Image = styled . img `
37+ width: 100vw;
38+ height: auto;
39+ ` ;
40+
41+ const Content = styled . div < { hasImage : boolean } > `
42+ margin-top: ${ ( props ) => ( props . hasImage ? "27px" : "36px" ) } ;
43+ padding: 0 16px;
44+ ` ;
45+
46+ const ButtonWrapper = styled . div `
47+ position: absolute;
48+ bottom: 12px;
49+ margin: 0 16px;
50+ ` ;
51+
52+ const Button = styled . button `
53+ ${ BlackButton }
54+ width: calc(100vw - 32px);
55+ ` ;
You can’t perform that action at this time.
0 commit comments