Skip to content

Commit ffe69f3

Browse files
authored
Merge pull request #11666 from TylerAPfledderer/fix/hero-text-bg-flash
fix(HubHero): create semantic token for content background color
2 parents 06a109e + d2fe8cb commit ffe69f3

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

src/@chakra-ui/gatsby-plugin/semanticTokens.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ const semanticTokens = {
9292
_dark: "whiteAlpha.400",
9393
},
9494
switchBackground: { _light: "gray.300", _dark: "whiteAlpha.400" },
95+
hubHeroContentBg: {
96+
_light: "rgba(255, 255, 255, 0.80)",
97+
_dark: "rgba(34, 34, 34, 0.80)",
98+
},
9599
},
96100
gradients: {
97101
bgMainGradient: {

src/components/Hero/HubHero/index.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
import * as React from "react"
2-
import {
3-
Box,
4-
Heading,
5-
HStack,
6-
Stack,
7-
Text,
8-
useColorModeValue,
9-
} from "@chakra-ui/react"
2+
import { Box, Heading, HStack, Stack, Text } from "@chakra-ui/react"
103
import GatsbyImage from "../../GatsbyImage"
114
import { CallToAction } from "../CallToAction"
125
import { CommonHeroProps } from "../utils"
@@ -22,11 +15,6 @@ const HubHero = (props: HubHeroProps) => {
2215
)
2316
}
2417

25-
const largeContentBg = useColorModeValue(
26-
"rgba(255, 255, 255, 0.80)",
27-
"rgba(34, 34, 34, 0.80)"
28-
)
29-
3018
return (
3119
<Box position="relative">
3220
<GatsbyImage
@@ -47,7 +35,7 @@ const HubHero = (props: HubHeroProps) => {
4735
p={{ base: "4", lg: "8" }}
4836
textAlign={{ base: "center", xl: "start" }}
4937
borderRadius={{ xl: "base" }}
50-
bg={{ xl: largeContentBg }}
38+
bg={{ xl: "hubHeroContentBg" }}
5139
position={{ xl: "absolute" }}
5240
insetStart={{ xl: "8" }}
5341
maxW={{ xl: "sm" }}

0 commit comments

Comments
 (0)