Skip to content

Commit 5121b24

Browse files
committed
Replace remaining hardcoded hex values with design tokens
1 parent 82bb92a commit 5121b24

13 files changed

Lines changed: 41 additions & 28 deletions

File tree

components/BillStatusCard/BillStatusCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const HandleBranchStyle = (branchStyle: string) => {
4242
returnStyle = { backgroundColor: "var(--maple-brand-primary)" }
4343
break
4444
case "SENATE":
45-
returnStyle = { backgroundColor: "#A92929" }
45+
returnStyle = { backgroundColor: "var(--maple-brand-senate)" }
4646
break
4747
default:
4848
returnStyle = {
@@ -102,7 +102,7 @@ const ScrollStyle = styled.div`
102102
103103
/* Handle */
104104
::-webkit-scrollbar-thumb {
105-
background: #d9d9d9;
105+
background: var(--maple-border-default);
106106
border-radius: 10px;
107107
}
108108
`

components/Newsfeed/StyledNewsfeedComponents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const HeaderTitle = styled(Col)`
2424
font-size: 40px;
2525
line-height: var(--maple-line-height-loose);
2626
letter-spacing: -0.03em;
27-
color: #000000;
27+
color: var(--maple-text-strong);
2828
`
2929

3030
export const StyledContainer = styled(Container)`

components/TestimonyCard/Tabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ const TabStyle = styled.div<{
147147
props.variant === "ballotQuestion"
148148
? props.active
149149
? "var(--maple-brand-danger)"
150-
: "#212529"
150+
: "var(--maple-text-strong)"
151151
: props.active
152152
? "var(--maple-brand-danger)"
153153
: "black"};

components/TestimonyCard/ViewTestimony.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ const ViewTestimony = (
207207
export default ViewTestimony
208208

209209
const FeedShell = styled.div`
210-
border: 1px solid #dee2e6;
210+
border: 1px solid var(--maple-border-default);
211211
border-radius: 0.75rem;
212212
padding: 1.5rem;
213213
box-shadow: 0 0.125rem 0.5rem rgba(15, 23, 42, 0.06);

components/ballotquestions/OverviewTab.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,25 +141,25 @@ function BallotGlyph() {
141141
height="2.7"
142142
rx="0.7"
143143
fill="rgba(94, 114, 228, 0.14)"
144-
stroke="#3249b3"
144+
stroke="var(--maple-brand-primary)"
145145
strokeWidth="1.2"
146146
/>
147147
<path
148148
d="M9.1 11.45L9.8 12.15L10.95 10.95"
149-
stroke="#3249b3"
149+
stroke="var(--maple-brand-primary)"
150150
strokeWidth="1.25"
151151
strokeLinecap="round"
152152
strokeLinejoin="round"
153153
/>
154154
<path
155155
d="M12.6 10.9H15.95"
156-
stroke="#3249b3"
156+
stroke="var(--maple-brand-primary)"
157157
strokeWidth="1.35"
158158
strokeLinecap="round"
159159
/>
160160
<path
161161
d="M8.3 15.2H15.95"
162-
stroke="#94A3B8"
162+
stroke="var(--maple-text-muted)"
163163
strokeWidth="1.35"
164164
strokeLinecap="round"
165165
/>

components/bill/BillTracker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const BillStageStrip = ({
6161
const color = isCurrentStage
6262
? "var(--bs-green)"
6363
: isPastStage
64-
? "#8EBC81"
64+
? "var(--maple-brand-stage-past)"
6565
: "var(--bs-gray)"
6666

6767
return (

components/bill/TestimonyCounts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const CountCategory = styled.div`
3131
3232
letter-spacing: 0.03em;
3333
34-
color: #979797;
34+
color: var(--maple-text-muted);
3535
`
3636

3737
const CountIcon = styled(Image)`

components/hearing/HearingSidebar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const BillsBody = styled.div`
8585
`
8686

8787
const ModalLine = styled.hr`
88-
border-color: #000000;
88+
border-color: currentColor;
8989
border-style: solid;
9090
border-width: 1px;
9191
opacity: 0.1;
@@ -103,7 +103,7 @@ const SidebarBottom = styled.div`
103103
`
104104

105105
const SidebarHeader = styled.div`
106-
background-color: #c0c4dc;
106+
background-color: var(--maple-surface-hearing-header);
107107
border-top-left-radius: 0.75rem;
108108
border-top-right-radius: 0.75rem;
109109
padding-top: var(--maple-space-sm);
@@ -561,7 +561,7 @@ function VotesModal({
561561

562562
const VoteRow = styled.div`
563563
&:nth-child(even) {
564-
background-color: #eae7e7;
564+
background-color: var(--maple-surface-page);
565565
&:nth-child(odd) {
566566
background-color: white;
567567
}

components/hearing/Transcriptions.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const ResultNumText = styled.div`
3434
top: 50%;
3535
user-select: none;
3636
transform: translateY(-50%);
37-
color: #979797;
37+
color: var(--maple-text-muted);
3838
`
3939

4040
const NoResultFound = styled.div`
@@ -54,12 +54,12 @@ const SearchInput = styled.input`
5454
outline: none;
5555
color: var(--maple-brand-primary);
5656
&:focus {
57-
border-color: #999;
58-
background-color: #fff;
57+
border-color: var(--maple-border-default);
58+
background-color: var(--maple-surface-base);
5959
}
6060
6161
&::placeholder {
62-
color: #aaa;
62+
color: var(--maple-text-muted);
6363
}
6464
`
6565

@@ -76,7 +76,7 @@ const SearchIcon = styled(FontAwesomeIcon)`
7676
const SearchWrapper = styled.div`
7777
position: relative;
7878
width: 100%;
79-
background-color: #8c98c2;
79+
background-color: var(--maple-surface-hearing-search);
8080
padding: 1.5rem 1rem;
8181
`
8282

@@ -115,8 +115,8 @@ const TranscriptRow = styled(Row)`
115115
border-left-width: 5px;
116116
}
117117
&:nth-child(odd) {
118-
background-color: #e8ecf4;
119-
border-left-color: #e8ecf4;
118+
background-color: var(--maple-surface-transcript-stripe);
119+
border-left-color: var(--maple-surface-transcript-stripe);
120120
border-left-style: solid;
121121
border-left-width: 5px;
122122
}
@@ -125,7 +125,7 @@ const TranscriptRow = styled(Row)`
125125
border-bottom-right-radius: 0.75rem;
126126
}
127127
&:hover {
128-
background-color: #d9dfea;
128+
background-color: var(--maple-surface-transcript-hover);
129129
border-color: var(--maple-brand-primary);
130130
border-style: solid;
131131
border-width: 5px;
@@ -443,7 +443,10 @@ const TranscriptItem = forwardRef(function TranscriptItem(
443443
value={element.start}
444444
>
445445
{isHovered ? (
446-
<ArrowRightAlt fontSize="large" style={{ color: "#737373" }} />
446+
<ArrowRightAlt
447+
fontSize="large"
448+
style={{ color: "var(--maple-text-muted)" }}
449+
/>
447450
) : (
448451
<></>
449452
)}

components/layout.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ export const Layout: React.FC<React.PropsWithChildren<LayoutProps>> = ({
5555
<a href="#main-content" className="skip-link">
5656
Skip to main content
5757
</a>
58-
<header>
59-
<MainNavbar />
60-
</header>
58+
<MainNavbar />
6159
<AuthModal />
6260
<main id="main-content" className="col" tabIndex={-1}>
6361
{children}

0 commit comments

Comments
 (0)