Skip to content

Commit

Permalink
fix: subtle border color
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanyoung committed Apr 23, 2024
1 parent 96dfc7c commit 915c4b6
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"@rollup/rollup-linux-x64-gnu": "^4.9.6"
},
"dependencies": {
"@hyphen/hyphen-design-tokens": "^3.2.0",
"@hyphen/hyphen-design-tokens": "^3.2.1",
"@popperjs/core": "^2.11.8",
"@types/react-modal": "^3.16.3",
"classnames": "^2.5.1",
Expand Down
11 changes: 10 additions & 1 deletion src/components/Box/Box.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,16 @@ export const Border = () => {
return (
<Box gap="md">
<Box borderColor="default" borderWidth="sm" padding="md">
separator
default
</Box>
<Box borderColor="subtle" borderWidth="sm" padding="md">
subtle
</Box>
<Box borderColor="hover" borderWidth="sm" padding="md">
hover
</Box>
<Box borderColor="active" borderWidth="sm" padding="md">
active
</Box>
<Box borderColor="info" borderWidth="sm" padding="md">
info
Expand Down
31 changes: 31 additions & 0 deletions src/docs/Colors.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ColorPalette, ColorItem, Meta } from '@storybook/addon-docs';
import designTokens from '@hyphen/hyphen-design-tokens/build/json/variables.json';
import { Box } from '../../src/components/Box/Box';

<Meta title="Foundation/Colors" />

Expand Down Expand Up @@ -126,3 +127,33 @@ import designTokens from '@hyphen/hyphen-design-tokens/build/json/variables.json
)}
/>
</ColorPalette>

## Borders

<ColorPalette>
<ColorItem
title="Backgrounds"
subtitle="used for borders"
colors={Object.keys(designTokens.color.border).reduce((acc, item, i) => {
acc[item] = Object.keys(designTokens.color.border).map(
(g) => designTokens.color.border[g].value
)[i];
return acc;
}, {})}
/>
</ColorPalette>

## Text

<ColorPalette>
<ColorItem
title="Text"
subtitle="used for text"
colors={Object.keys(designTokens.color.font).reduce((acc, item, i) => {
acc[item] = Object.keys(designTokens.color.font).map(
(g) => designTokens.color.font[g].value
)[i];
return acc;
}, {})}
/>
</ColorPalette>

0 comments on commit 915c4b6

Please sign in to comment.