Skip to content

Commit

Permalink
style: add "gap" to list of pxKeys in css theme (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
jared-dickman authored Apr 5, 2024
1 parent 5b93945 commit 4648888
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/styles/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Then open the story `GetGlobalToken` to retrieve the latest global design token
Then paste that into [GlobalTokens.json](https://github.com/mParticle/aquarium/blob/main/design/GlobalToken.json)

These will then be converted into css variables on push, and committed via the [github action](https://github.com/mParticle/aquarium/blob/main/.github/workflows/tokens-to-css.yml)
If you need these new tokens immediately for local development, run `npm run tokens-to-css`
4 changes: 2 additions & 2 deletions src/utils/GetGlobalToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function GetGlobalToken(): React.ReactNode {
return Object.fromEntries(
Object.entries(obj)
.map(([key, value]) => {
const pxKeys = ['padding', 'margin', 'borderRadius', 'screen', 'size', 'font', 'width', 'height']
const pxKeys = ['padding', 'margin', 'borderRadius', 'screen', 'size', 'font', 'width', 'height', 'gap']
const excludePxKeys = ['lineHeight', 'fontWeight']

const addPx =
Expand Down Expand Up @@ -40,4 +40,4 @@ export function GetGlobalToken(): React.ReactNode {
const globalToken = wrapValuesInObject(getDesignToken(LightTheme))

return <>{JSON.stringify(globalToken, null, 1)}</>
}
}

0 comments on commit 4648888

Please sign in to comment.