Skip to content

Commit aec8586

Browse files
committed
ui+auth+base: updates input, adds purple button to auth page & updates component styling
1 parent c26d6bf commit aec8586

File tree

2 files changed

+59
-32
lines changed

2 files changed

+59
-32
lines changed

app/src/components/auth/AuthPage.tsx

+46-23
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import styled from '@emotion/styled';
44
import { ReactComponent as LogoImage } from 'assets/images/logo.svg';
55
import { usePrefixedTranslation } from 'hooks';
66
import { useStore } from 'store';
7-
import { Background, Button, HeaderOne, Input } from 'components/base';
7+
import { Background, HeaderOne, Input } from 'components/base';
8+
import PurpleButton from 'components/connect/PurpleButton';
89

910
const Styled = {
1011
Wrapper: styled.div`
@@ -16,40 +17,56 @@ const Styled = {
1617
height: 100%;
1718
`,
1819
Logo: styled(LogoImage)`
19-
color: ${props => props.theme.colors.offWhite};
20-
width: 80px;
21-
height: 156px;
22-
margin-bottom: 30px;
20+
color: ${props => props.theme.colors.white};
21+
width: 60px;
22+
height: 80px;
23+
margin-bottom: 32px;
2324
`,
2425
Title: styled(HeaderOne)`
25-
font-size: 75px;
26-
margin-bottom: 30px;
26+
color: ${props => props.theme.colors.white};
27+
font-size: 48px;
28+
line-height: 48px;
29+
margin-bottom: 0px;
2730
text-transform: uppercase;
2831
`,
2932
Subtitle: styled.div`
33+
color: ${props => props.theme.colors.gray};
3034
width: 100%;
31-
max-width: 500px;
32-
margin-bottom: 80px;
35+
max-width: 400px;
36+
margin-top: 24px;
37+
margin-bottom: 24px;
3338
text-align: center;
3439
`,
3540
Form: styled.form`
3641
display: flex;
3742
flex-direction: column;
3843
align-items: center;
3944
`,
45+
Input: styled(Input)`
46+
font-size: ${props => props.theme.sizes.l};
47+
width: 100%;
48+
color: ${props => props.theme.colors.white};
49+
padding: 8px 0px;
50+
border-width: 0;
51+
border-bottom: 2px solid ${props => props.theme.colors.gray};
52+
min-width: 360px;
53+
outline: none;
54+
`,
4055
Label: styled.label`
4156
margin: 10px 0 80px;
4257
`,
4358
ErrMessage: styled.div`
4459
width: 100%;
45-
margin: 0 0 80px;
46-
padding: 5px 0;
47-
background-color: ${props => props.theme.colors.pink};
48-
color: ${props => props.theme.colors.offWhite};
49-
text-align: center;
60+
padding: 8px 0;
61+
color: ${props => props.theme.colors.lightningRed};
62+
text-align: left;
5063
`,
51-
Submit: styled(Button)`
52-
background-color: transparent;
64+
PurpleButton: styled(PurpleButton)`
65+
font-size: ${props => props.theme.sizes.s};
66+
margin-top: 32px;
67+
line-height: 24px;
68+
padding: 12px 24px;
69+
width: 100%;
5370
`,
5471
};
5572

@@ -77,7 +94,16 @@ const AuthPage: React.FC = () => {
7794
// a UI flicker while validating credentials stored in session storage
7895
if (!store.initialized) return null;
7996

80-
const { Wrapper, Logo, Title, Subtitle, Form, Label, ErrMessage, Submit } = Styled;
97+
const {
98+
Wrapper,
99+
Logo,
100+
Title,
101+
Subtitle,
102+
Form,
103+
Input,
104+
ErrMessage,
105+
PurpleButton,
106+
} = Styled;
81107
return (
82108
<Background gradient>
83109
<Wrapper>
@@ -92,13 +118,10 @@ const AuthPage: React.FC = () => {
92118
autoFocus
93119
value={pass}
94120
onChange={handleChange}
121+
placeholder="Password"
95122
/>
96-
{error ? (
97-
<ErrMessage>{error}</ErrMessage>
98-
) : (
99-
<Label htmlFor="auth">{l('passLabel')}</Label>
100-
)}
101-
<Submit>{l('submitBtn')}</Submit>
123+
{error && <ErrMessage>{error}</ErrMessage>}
124+
<PurpleButton>{l('loginBtn')}</PurpleButton>
102125
</Form>
103126
</Wrapper>
104127
</Background>

app/src/components/base/shared.tsx

+13-9
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import Chevrons from 'assets/icons/chevrons.svg';
88
export const Background = styled.div<{ gradient?: boolean }>`
99
height: 100%;
1010
color: ${props => props.theme.colors.white};
11-
background: ${props =>
12-
props.gradient ? props.theme.colors.gradient : props.theme.colors.blue};
11+
background: radial-gradient(#1d273f, #101727);
1312
font-family: ${props => props.theme.fonts.open.regular};
1413
font-size: ${props => props.theme.sizes.m};
1514
`;
@@ -170,15 +169,20 @@ export const Button = styled.button<ButtonProps>`
170169
`;
171170

172171
export const Input = styled.input`
173-
font-family: ${props => props.theme.fonts.work.light};
174-
font-weight: 300;
172+
font-family: ${props => props.theme.fonts.open.regular};
173+
font-weight: 500;
175174
font-size: ${props => props.theme.sizes.xxl};
176175
color: ${props => props.theme.colors.offWhite};
177176
background-color: transparent;
178177
border-width: 0;
179-
border-bottom: 3px solid ${props => props.theme.colors.offWhite};
180-
padding: 5px;
181-
text-align: center;
178+
border-bottom: 2px solid ${props => props.theme.colors.offWhite};
179+
padding: 8px;
180+
text-align: left;
181+
transition: all 200ms;
182+
183+
&:hover {
184+
border-bottom-color: ${props => props.theme.colors.white};
185+
}
182186
183187
&:active,
184188
&:focus {
@@ -193,13 +197,13 @@ export const Input = styled.input`
193197
`;
194198

195199
export const TextArea = styled.textarea`
196-
font-family: ${props => props.theme.fonts.work.light};
200+
font-family: ${props => props.theme.fonts.open.regular};
197201
font-weight: 300;
198202
font-size: ${props => props.theme.sizes.m};
199203
color: ${props => props.theme.colors.offWhite};
200204
background-color: ${props => props.theme.colors.overlay};
201205
border-width: 0;
202-
border-bottom: 3px solid ${props => props.theme.colors.offWhite};
206+
border-bottom: 3px solid ${props => props.theme.colors.gray};
203207
padding: 5px;
204208
205209
&:active,

0 commit comments

Comments
 (0)