Skip to content

Commit 085d9e4

Browse files
Merge pull request #145 from gridaco/staging
Add comming-soon screens
2 parents 4ac0048 + b1513f6 commit 085d9e4

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
`;

0 commit comments

Comments
 (0)