Skip to content

Commit

Permalink
elevation tokens -> utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
zephraph committed Nov 2, 2022
1 parent 41b13f9 commit 4bd16bc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions scripts/convert-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,7 @@ StyleDictionary.registerFormat({
].map((make) => make(colors))}
}
module.exports.borderRadiusTokens = {
${borderRadius
.map(
({ name }) =>
`'${name.replace(/border-radius-?/, '') || 'DEFAULT'}': 'var(--${name})'`,
)
.join(',')}
}
module.exports.elevationTokens = {
module.exports.elevationUtilities = {
${boxShadow.map(
({ name, value }) =>
`'.${name}': {
Expand All @@ -255,6 +246,15 @@ StyleDictionary.registerFormat({
.join(', ')}'}`,
)}
}
module.exports.borderRadiusTokens = {
${borderRadius
.map(
({ name }) =>
`'${name.replace(/border-radius-?/, '') || 'DEFAULT'}': 'var(--${name})'`,
)
.join(',')}
}
`
},
})
Expand Down
14 changes: 7 additions & 7 deletions styles/dist/tailwind-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -932,13 +932,7 @@ module.exports.colorUtilities = {
},
}

module.exports.borderRadiusTokens = {
sm: 'var(--border-radius-sm)',
DEFAULT: 'var(--border-radius)',
full: 'var(--border-radius-full)',
}

module.exports.elevationTokens = {
module.exports.elevationUtilities = {
'.elevation-0': {
'box-shadow': 'none',
},
Expand All @@ -955,3 +949,9 @@ module.exports.elevationTokens = {
'0px 4.375px 4.625px #00000021, 0px 20px 13px #00000033, 0px 50.625px 34.875px #00000045, 0px 100px 80px #00000066',
},
}

module.exports.borderRadiusTokens = {
sm: 'var(--border-radius-sm)',
DEFAULT: 'var(--border-radius)',
full: 'var(--border-radius-full)',
}

0 comments on commit 4bd16bc

Please sign in to comment.