Skip to content

Commit 8a6e512

Browse files
authored
adding design for Welcome screen (#14)
1 parent 288dc14 commit 8a6e512

File tree

4 files changed

+114
-22
lines changed

4 files changed

+114
-22
lines changed

src/popup/App.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ import { reducer as auth } from "popup/ducks/authServices";
1010
import Router from "./Router";
1111

1212
const GlobalStyle = createGlobalStyle`
13-
html, body, #root {
14-
height: 100%;
15-
}
1613
body {
1714
background: ${COLOR_PALETTE.background};
1815
overscroll-behavior: none;
1916
font-family: 'Muli', sans-serif;
17+
font-size: 100%;
2018
margin: 0;
2119
}
2220
`;

src/popup/components/Layout/Fullscreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const HeaderEl = styled.h1`
1313
max-width: 21rem;
1414
`;
1515

16-
const Screen = styled.div`
16+
export const Screen = styled.div`
1717
align-content: center;
1818
align-items: center;
1919
display: flex;

src/popup/styles/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export const COLOR_PALETTE = {
33
text: "#060E1A",
44
primary: "#391EDA",
55
primaryGradient: "linear-gradient(90deg, #391EDA 100%, #5339ED 0%)",
6+
secondary: "#654CF7",
67
};

src/popup/views/Welcome/index.tsx

Lines changed: 111 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,121 @@
11
import React from "react";
22
import styled from "styled-components";
33
import { Link } from "react-router-dom";
4+
import Header from "popup/components/Layout/Header";
5+
import { Screen } from "popup/components/Layout/Fullscreen";
6+
import { COLOR_PALETTE } from "popup/styles";
47

5-
const FormUl = styled.ul`
6-
list-style-type: none;
8+
const HalfScreen = styled.div`
9+
padding: 0 1.6rem;
10+
width: 23rem;
11+
`;
12+
13+
const Box = styled.div`
14+
border-radius: 1.875rem;
15+
color: #fff;
16+
padding: 2.6rem 2.3rem;
17+
position: relative;
18+
`;
19+
20+
const CreateBox = styled(Box)`
21+
background: ${COLOR_PALETTE.primaryGradient};
22+
color: #fff;
23+
`;
24+
25+
const ImportBox = styled(Box)`
26+
border: 1px solid ${COLOR_PALETTE.primary};
27+
color: ${COLOR_PALETTE.primary};
28+
`;
29+
30+
const BoxHeader = styled.div`
31+
color: ${COLOR_PALETTE.text};
32+
font-size: 2.4rem;
33+
font-weight: 200;
34+
height: 7.5rem;
35+
line-height: 3.75rem;
36+
margin-bottom: 2.9rem;
37+
38+
strong {
39+
color: ${COLOR_PALETTE.primary};
40+
}
41+
`;
42+
43+
const BoxHeaderEl = styled.h3`
44+
font-size: 1.6rem;
45+
font-weight: 400;
46+
line-height: 2rem;
47+
margin: 0.75rem 0;
48+
`;
49+
50+
const BoxIcon = styled.div`
51+
font-size: 2.8rem;
52+
position: absolute;
53+
top: 1.5rem;
54+
right: 1.6rem;
55+
`;
56+
57+
const LinkButtonWrapper = styled.div`
58+
text-align: center;
59+
`;
60+
61+
const LinkButton = styled(Link)`
62+
border-radius: 1rem;
63+
color: #fff;
64+
display: inline-block;
65+
font-weight: 800;
66+
margin: 3.4rem auto 0;
67+
padding: 1.25rem 2rem;
68+
text-align: center;
69+
text-decoration: none;
70+
`;
71+
72+
const CreateButton = styled(LinkButton)`
73+
background: ${COLOR_PALETTE.secondary};
74+
`;
75+
76+
const ImportButton = styled(LinkButton)`
77+
background: ${COLOR_PALETTE.primaryGradient};
778
`;
879

980
const Welcome = () => (
10-
<nav>
11-
<FormUl>
12-
<>
13-
<li>
14-
<h1>
15-
<Link to="/create-password">I'm new!</Link>
16-
</h1>
17-
</li>
18-
<li>
19-
<h1>
20-
<Link to="/recover-account">I've done this before</Link>
21-
</h1>
22-
</li>
23-
</>
24-
</FormUl>
25-
</nav>
81+
<>
82+
<Header />
83+
<Screen>
84+
<HalfScreen>
85+
<BoxHeader>
86+
Welcome, <br />
87+
are you new to <strong>Lyra?</strong>
88+
</BoxHeader>
89+
<CreateBox>
90+
<BoxIcon>
91+
<span role="img" aria-label="Waving hand">
92+
👋
93+
</span>
94+
</BoxIcon>
95+
<BoxHeaderEl>I’m new!</BoxHeaderEl>
96+
<p>I’m going to need a seed phrase</p>
97+
<LinkButtonWrapper>
98+
<CreateButton to="/create-password">Create wallet</CreateButton>
99+
</LinkButtonWrapper>
100+
</CreateBox>
101+
</HalfScreen>
102+
<HalfScreen>
103+
<BoxHeader />
104+
<ImportBox>
105+
<BoxIcon>
106+
<span role="img" aria-label="Seedling">
107+
🌱
108+
</span>
109+
</BoxIcon>
110+
<BoxHeaderEl>I’ve done this before</BoxHeaderEl>
111+
<p>I have my 12 word seed phrase</p>
112+
<LinkButtonWrapper>
113+
<ImportButton to="/recover-account">Import wallet</ImportButton>
114+
</LinkButtonWrapper>
115+
</ImportBox>
116+
</HalfScreen>
117+
</Screen>
118+
</>
26119
);
27120

28121
export default Welcome;

0 commit comments

Comments
 (0)