Skip to content

Commit 80e7e46

Browse files
authored
Merge pull request #64 from uwblueprint/W25/trinity/set-up-color-theme
W25/trinity/ setup color theme + typography
2 parents 95eeb65 + a6f5cc3 commit 80e7e46

File tree

6 files changed

+152
-64
lines changed

6 files changed

+152
-64
lines changed

frontend/src/components/pages/CreatePasswordPage.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const CreatePasswordPage = (): React.ReactElement => {
109109
<ResponsiveLogo />
110110
<ResponsiveAuthContainer>
111111
<Text
112-
color="#4A5568"
112+
color="gray.600"
113113
textStyle={{ base: "h2Mobile", md: "h2" }}
114114
mb="0"
115115
textAlign="center"
@@ -121,23 +121,23 @@ const CreatePasswordPage = (): React.ReactElement => {
121121
<Box>
122122
<FormLabel
123123
fontSize="14px"
124-
textColor="var(--gray-600, #4A5568)"
124+
textColor="gray.600"
125125
lineHeight="8px"
126126
>
127127
Email Address:
128128
</FormLabel>
129129
<Input
130-
textColor="var(--gray-400, #A0AEC0)"
130+
textColor="gray.400"
131131
fontSize="14px"
132132
height="2.4rem"
133133
placeholder={email}
134134
isDisabled
135-
bg="var(--gray-200, #E2E8F0)"
135+
bg="gray.200"
136136
/>
137137
</Box>
138138
<Box fontSize="12px">
139139
<FormLabel
140-
textColor="var(--gray-600, #4A5568)"
140+
textColor="gray.600"
141141
fontSize="14px"
142142
lineHeight="8px"
143143
>
@@ -152,7 +152,7 @@ const CreatePasswordPage = (): React.ReactElement => {
152152
</Box>
153153
<Box fontSize="12px">
154154
<FormLabel
155-
textColor="var(--gray-600, #4A5568)"
155+
textColor="gray.600"
156156
fontSize="14px"
157157
lineHeight="8px"
158158
>
@@ -174,7 +174,7 @@ const CreatePasswordPage = (): React.ReactElement => {
174174
color="white"
175175
h="2.4rem"
176176
width="100%"
177-
bg="var(--blue-700, #2C5282)"
177+
bg="blue.700"
178178
>
179179
Create Account
180180
</Button>
@@ -199,7 +199,7 @@ const CreatePasswordPage = (): React.ReactElement => {
199199
{showModal && (
200200
<ResponsiveModalWindow>
201201
<Text
202-
color="#2C5282"
202+
color="blue.700"
203203
textAlign="center"
204204
textStyle={{ base: "h2", md: "h1" }}
205205
>
@@ -212,8 +212,8 @@ const CreatePasswordPage = (): React.ReactElement => {
212212
Welcome to the Oakville & Milton Humane Society
213213
</Text>
214214
<Button
215-
color="var(--gray-100, #EDF2F7)"
216-
bg="var(--blue-700, #2C5282)"
215+
color="gray.100"
216+
bg="blue.700"
217217
height="3rem"
218218
padding="0rem 1.875rem"
219219
textStyle="button"

frontend/src/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React from "react";
22
import { createRoot } from "react-dom/client";
33
import { ChakraProvider } from "@chakra-ui/react";
4-
import theme from "./theme";
5-
4+
import theme from "./theme/theme";
65
import "./index.css";
76
import App from "./App";
87
import reportWebVitals from "./reportWebVitals";

frontend/src/theme.tsx

Lines changed: 0 additions & 52 deletions
This file was deleted.

frontend/src/theme/colors.tsx

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
const colors = {
2+
white: {
3+
default: "#FFFFFF",
4+
},
5+
gray: {
6+
50: "#F7FAFC",
7+
100: "#EDF2F7",
8+
200: "#E2E8F0",
9+
300: "#CBD5E0",
10+
400: "#A0AEC0",
11+
500: "#718096",
12+
600: "#4A5568",
13+
700: "#2D3748",
14+
800: "#1A202C",
15+
},
16+
purple: {
17+
50: "#FAF5FF",
18+
100: "#E9D8FD",
19+
300: "#B794F4",
20+
800: "#44337A",
21+
},
22+
blue: {
23+
50: "#EBF8FF",
24+
100: "#BEE3F8",
25+
200: "#90CDF4",
26+
400: "#4299E1",
27+
500: "#3182CE",
28+
700: "#2C5282",
29+
},
30+
teal: {
31+
50: "#E6FFFA",
32+
100: "#B2F5EA",
33+
200: "#81E6D9",
34+
300: "#4FD1C5",
35+
400: "#38B2AC",
36+
},
37+
green: {
38+
50: "#F0FFF4",
39+
100: "#C6F6D5",
40+
200: "#9AE6B4",
41+
300: "#68D391",
42+
500: "#38A169",
43+
800: "#22543D",
44+
},
45+
yellow: {
46+
200: "#FAF089",
47+
400: "#FFEB6A",
48+
500: "#EACF03",
49+
},
50+
orange: {
51+
200: "#FBD38D",
52+
400: "#ED8936",
53+
500: "#DD6B20",
54+
800: "#7B341E",
55+
},
56+
red: {
57+
200: "#FBD38D",
58+
400: "#F56565",
59+
600: "#B02124",
60+
800: "#822727",
61+
},
62+
pink: {
63+
50: "#FFF5F7",
64+
100: "#FED7E2",
65+
300: "#F687B3",
66+
400: "#ED64A6",
67+
800: "#702459",
68+
},
69+
};
70+
71+
export default colors;

frontend/src/theme/textStyles.tsx

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import "@fontsource/poppins";
2+
import "@fontsource/roboto";
3+
4+
const textStyles = {
5+
h1: {
6+
fontFamily: "Poppins",
7+
fontWeight: 600,
8+
fontSize: "40px",
9+
},
10+
h2: {
11+
fontFamily: "Poppins",
12+
fontWeight: 600,
13+
fontSize: "28px",
14+
},
15+
h2Mobile: {
16+
fontFamily: "Poppins",
17+
fontWeight: 600,
18+
fontSize: "24px",
19+
},
20+
h3: {
21+
fontFamily: "Poppins",
22+
fontWeight: 500,
23+
fontSize: "20px",
24+
},
25+
subheading: {
26+
fontFamily: "Poppins",
27+
fontWeight: 500,
28+
fontSize: "20px",
29+
},
30+
body: {
31+
fontFamily: "Roboto",
32+
fontWeight: 400,
33+
fontSize: "18px",
34+
lineHeight: "150%",
35+
},
36+
bodyBold: {
37+
fontFamily: "Roboto",
38+
fontWeight: 700,
39+
fontSize: "18px",
40+
lineHeight: "150%",
41+
},
42+
bodyMobile: {
43+
fontFamily: "Roboto",
44+
fontWeight: 400,
45+
fontSize: "16px",
46+
lineHeight: "150%",
47+
},
48+
button: {
49+
fontFamily: "Poppins",
50+
fontWeight: 500,
51+
fontSize: "18px",
52+
},
53+
caption: {
54+
fontFamily: "Poppins",
55+
fontWeight: 400,
56+
fontSize: "12px",
57+
},
58+
};
59+
60+
export default textStyles;

frontend/src/theme/theme.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { extendTheme } from "@chakra-ui/react";
2+
import textStyles from "./textStyles";
3+
import colors from "./colors";
4+
5+
const theme = extendTheme({
6+
colors,
7+
textStyles,
8+
});
9+
10+
export default theme;

0 commit comments

Comments
 (0)