Skip to content

Commit f62ed26

Browse files
committed
fix: both foundations and semantic colors (from style guide) can be referenced
1 parent 17a082b commit f62ed26

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

testing/src/views/Colors.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as colors from '@/../../theme/src/foundations/colors'
44
const BORDER_WIDTH_IN_PIXEL = 2
55

66
export function Colors({withText = false}: {withText?: boolean}) {
7-
const ELEMENT_WIDTH = (withText ? 150 : 50) - BORDER_WIDTH_IN_PIXEL
7+
const ELEMENT_WIDTH = (withText ? 100 : 50) - BORDER_WIDTH_IN_PIXEL
88

99
return (
1010
<>
@@ -28,8 +28,8 @@ export function Colors({withText = false}: {withText?: boolean}) {
2828
</div>
2929
{withText && (
3030
<div>
31-
<Text fontFamily="monospace">{_key}.{weight}</Text>
32-
<Text fontFamily="monospace" color={colors.neutrals['500']}>{colorValue}</Text>
31+
<Text fontFamily="monospace" fontSize="xs">{_key}.{weight}</Text>
32+
<Text fontFamily="monospace" fontSize="xs" color={colors.neutrals['500']}>{colorValue}</Text>
3333
</div>
3434
)}
3535
</VStack>

theme/src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { mode } from '@chakra-ui/theme-tools'
66
import { buttonTheme } from './components/button'
77
import { headingTheme } from './components/headings'
88

9+
import * as colors from './foundations/colors'
910
import semanticColors from './style-guide/computedSemanticColors'
1011

1112
export const fonts = {
@@ -31,6 +32,7 @@ export const components = {
3132
export const theme = extendBaseTheme({
3233
fonts,
3334
colors: {
35+
...colors,
3436
...semanticColors
3537
},
3638
styles,

0 commit comments

Comments
 (0)