mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-30 01:17:37 +03:00
ab0c70b673
* documentation update + design tokens generation * ts config update * formatting fix * update tokens config format * ignore JS files check * Storybook version bump * formatting fix * dark theme toggle added
27 lines
498 B
JavaScript
27 lines
498 B
JavaScript
import pluginCSS from '@cobalt-ui/plugin-css';
|
|
|
|
function pxToRem(token) {
|
|
if (token.$type === 'dimension' && token.$value.slice(-2) === 'px') {
|
|
return token.$value.slice(0, -2) / 16 + 'rem';
|
|
}
|
|
}
|
|
|
|
export default {
|
|
tokens: './design-tokens.json',
|
|
outDir: './src/styles/core',
|
|
plugins: [
|
|
pluginCSS({
|
|
filename: 'design-tokens.css',
|
|
modeSelectors: [
|
|
{
|
|
mode: 'dark',
|
|
selectors: [':root.dark']
|
|
}
|
|
],
|
|
p3: false,
|
|
colorFormat: 'hex',
|
|
transform: pxToRem
|
|
})
|
|
]
|
|
};
|