Skip to content

Commit

Permalink
chore(storybook): changes default theme to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
dzucconi committed Jul 1, 2021
1 parent 0b3d968 commit 4481444
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/palette/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ const { GlobalStyles } = injectGlobalStyles()

export const decorators = [
(Story) => {
const [theme, setTheme] = useState(localStorage.getItem("theme") ?? "v2")
const [theme, setTheme] = useState(localStorage.getItem("theme") ?? "v3")

return (
<Theme theme={THEMES[theme]}>
<>
<GlobalStyles />

<Tabs
initialTabIndex={["v2", "v3"].indexOf(theme)}
initialTabIndex={["v3", "v2"].indexOf(theme)}
onChange={({ name }) => {
setTheme(name)
localStorage.setItem("theme", name)
}}
>
<Tab name="v2">
<Tab name="v3">
<Story />
</Tab>

<Tab name="v3">
<Tab name="v2">
<Story />
</Tab>
</Tabs>
Expand Down

0 comments on commit 4481444

Please sign in to comment.