Skip to content

Commit 4b3027e

Browse files
committed
add staking colors to tw theme
1 parent 8ef62e3 commit 4b3027e

File tree

5 files changed

+53
-24
lines changed

5 files changed

+53
-24
lines changed

src/components/Staking/StakingComparison.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ const StakingComparison = ({ page, className }: StakingComparisonProps) => {
4040
eventAction: `Clicked`,
4141
eventName: "clicked solo staking",
4242
},
43-
colorClassName: "text-[#be8d10]",
44-
glyph: <StakingGlyphCPUIcon className="h-[50px] w-[50px] text-[#be8d10]" />,
43+
colorClassName: "text-staking-gold",
44+
glyph: (
45+
<StakingGlyphCPUIcon className="h-[50px] w-[50px] text-staking-gold" />
46+
),
4547
}
4648
const saas: DataType = {
4749
title: "page-staking-saas-with-abbrev",
@@ -52,9 +54,9 @@ const StakingComparison = ({ page, className }: StakingComparisonProps) => {
5254
eventAction: `Clicked`,
5355
eventName: "clicked staking as a service",
5456
},
55-
colorClassName: "text-[#129e5b]",
57+
colorClassName: "text-staking-green",
5658
glyph: (
57-
<StakingGlyphCloudIcon className="h-[28px] w-[50px] text-[#129e5b]" />
59+
<StakingGlyphCloudIcon className="h-[28px] w-[50px] text-staking-green" />
5860
),
5961
}
6062
const pools: DataType = {
@@ -66,9 +68,9 @@ const StakingComparison = ({ page, className }: StakingComparisonProps) => {
6668
eventAction: `Clicked`,
6769
eventName: "clicked pooled staking",
6870
},
69-
colorClassName: "text-[#0b83dc]",
71+
colorClassName: "text-staking-blue",
7072
glyph: (
71-
<StakingGlyphTokenWalletIcon className="h-[39px] w-[50px] text-[#0b83dc]" />
73+
<StakingGlyphTokenWalletIcon className="h-[39px] w-[50px] text-staking-blue" />
7274
),
7375
}
7476
const data: {

src/components/Staking/StakingHierarchy.tsx

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from "react"
22
import { useTranslation } from "next-i18next"
3+
import { IconBase } from "react-icons"
34
import {
45
Box,
56
calc,
@@ -117,19 +118,13 @@ const SectionGrid = ({ number, children }: SectionGridProps) => {
117118
)
118119
}
119120

120-
const StyledEtherSvg = ({ size }: { size: string }) => (
121-
<Center gridArea="ether" zIndex={2} maxW={20} width="full" mx="auto">
122-
<StakingGlyphEtherCircleIcon
123-
boxSize={size}
124-
color={$colorVar.reference}
125-
sx={{
126-
"#transparentBackground": {
127-
fill: $fillColorVar.reference,
128-
},
129-
}}
130-
/>
131-
</Center>
132-
)
121+
const StyledEtherSvg = ({ className = "size-full" }: { className: string }) => {
122+
return (
123+
<Center gridArea="ether" zIndex={2} maxW={20} width="full" mx="auto">
124+
<StakingGlyphEtherCircleIcon className={className} />
125+
</Center>
126+
)
127+
}
133128

134129
const Line = () => {
135130
// TODO: Remove after completion of the Chakra migration
@@ -211,7 +206,7 @@ const Pills = ({ children }: ChildOnlyProp) => (
211206
</Flex>
212207
)
213208

214-
type GlyphProps = { glyphIcon: typeof Icon }
209+
type GlyphProps = { glyphIcon: typeof IconBase }
215210
const Glyph = ({ glyphIcon }: GlyphProps) => (
216211
<Center gridArea={{ base: "content", md: "glyph" }}>
217212
<Icon
@@ -262,7 +257,7 @@ const StakingHierarchy = () => {
262257
}}
263258
>
264259
<SectionGrid number={1}>
265-
<StyledEtherSvg size="100%" />
260+
<StyledEtherSvg className="size-[100%] text-staking-gold" />
266261
<Line />
267262
<Header>
268263
<HeadingEl>{t("page-staking-hierarchy-solo-h2")}</HeadingEl>
@@ -300,7 +295,7 @@ const StakingHierarchy = () => {
300295
</Content>
301296
</SectionGrid>
302297
<SectionGrid number={2}>
303-
<StyledEtherSvg size="90%" />
298+
<StyledEtherSvg className="size-[90%] text-staking-green" />
304299
<Line />
305300
<Header>
306301
<HeadingEl>{t("page-staking-dropdown-saas")}</HeadingEl>
@@ -333,7 +328,7 @@ const StakingHierarchy = () => {
333328
</Content>
334329
</SectionGrid>
335330
<SectionGrid number={3}>
336-
<StyledEtherSvg size="80%" />
331+
<StyledEtherSvg className="size-[80%] text-staking-blue" />
337332
<Line />
338333
<Header>
339334
<HeadingEl>{t("page-staking-dropdown-pools")}</HeadingEl>
@@ -378,7 +373,7 @@ const StakingHierarchy = () => {
378373
</Content>
379374
</SectionGrid>
380375
<SectionGrid number={4}>
381-
<StyledEtherSvg size="70%" />
376+
<StyledEtherSvg className="size-[70%] text-staking-red" />
382377
<Line />
383378
<Header>
384379
<HeadingEl>{t("page-staking-hierarchy-cex-h2")}</HeadingEl>

src/components/icons/staking/StakingGlyphEtherCircleIcon.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const StakingGlyphEtherCircleIcon = createIconBase({
1010
<path
1111
id="transparentBackground"
1212
fillRule="nonzero"
13+
fill="transparent"
1314
d="M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32ZM16.1395 4.17392L8.90476 16.4383L16.1395 20.6261L23.3743 16.4383L16.1395 4.17392ZM8.90476"
1415
/>
1516
<path

src/styles/semantic-tokens.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@
116116
--shadow-window-box-3: 0px 32px 24px -6px hsla(var(--purple-800), var(--shadow-window-box-3-opacity));
117117
--shadow-window-box-4: 0px 40px 40px -12px hsla(var(--purple-700), var(--shadow-window-box-4-opacity));
118118
--shadow-window-box-5: 0px -64px 120px 80px hsla(var(--purple-100), var(--shadow-window-box-5-opacity));
119+
120+
/* Staking */
121+
--staking-gold: #be8d10;
122+
--staking-gold-fill: #fef9ef;
123+
--staking-green: #129e5b;
124+
--staking-green-fill: #f7faf1;
125+
--staking-blue: #0b83dc;
126+
--staking-blue-fill: #f1fcf5;
127+
--staking-red: #a0524c;
128+
--staking-red-fill: #f8fbf9;
119129
}
120130

121131
/* Dark mode token declarations */
@@ -204,5 +214,15 @@
204214
--shadow-window-box-3-opacity: 0.16;
205215
--shadow-window-box-4-opacity: 0.06;
206216
--shadow-window-box-5-opacity: 0.06;
217+
218+
/* Staking */
219+
--staking-gold: #f2bb2f;
220+
--staking-gold-fill: #373228;
221+
--staking-green: #49de96;
222+
--staking-green-fill: #30342b;
223+
--staking-blue: #a9d3f2;
224+
--staking-blue-fill: #2b352f;
225+
--staking-red: #d6bbb9;
226+
--staking-red-fill: #313432;
207227
}
208228
}

tailwind.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,17 @@ const config = {
207207
border: "hsla(var(--warning-border))",
208208
},
209209

210+
staking: {
211+
gold: "var(--staking-gold)",
212+
"gold-fill": "var(--staking-gold-fill)",
213+
green: "var(--staking-green)",
214+
"green-fill": "var(--staking-green-fill)",
215+
blue: "var(--staking-blue)",
216+
"blue-fill": "var(--staking-blue-fill)",
217+
red: "var(--staking-red)",
218+
"red-fill": "var(--staking-red-fill)",
219+
},
220+
210221
/** @deprecated */
211222
"switch-background": "hsla(var(--switch-background))", // TODO: Migrate
212223
"tooltip-shadow": "var(--tooltip-shadow)",

0 commit comments

Comments
 (0)