feat(SW-375): new tokens

new asset generation logic

BREAKING CHANGE: New tokens.
This commit is contained in:
Michael Zetterberg
2025-01-20 14:46:25 +01:00
parent 7ce2ee2922
commit 56973888c9
189 changed files with 34368 additions and 10344 deletions
@@ -0,0 +1,40 @@
import { ComponentPropsWithoutRef } from 'react'
import {
Button,
Label,
ListBox,
ListBoxItem,
Popover,
Select,
SelectValue,
} from 'react-aria-components'
import { themes } from '../../.storybook/preview'
type ThemeSwitcherProps = Pick<
ComponentPropsWithoutRef<typeof Select>,
'defaultSelectedKey' | 'onSelectionChange'
>
export function ThemeSwitcher(props: ThemeSwitcherProps) {
return (
<Select {...props}>
<Label>Theme: </Label>
<Button>
<SelectValue />
<span aria-hidden="true"></span>
</Button>
<Popover style={{ border: 'solid 1px #000', background: '#fff' }}>
<ListBox>
{Array.from(Object.entries(themes.themes)).map(([label, key]) => {
return (
<ListBoxItem key={key} id={key} style={{ padding: '0.5em' }}>
{label}
</ListBoxItem>
)
})}
</ListBox>
</Popover>
</Select>
)
}