Skip to content

Commit

Permalink
add ThemeProvider+CSSReset
Browse files Browse the repository at this point in the history
  • Loading branch information
with-heart committed Jun 9, 2020
1 parent 97d71bf commit ec4e457
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react'
import {addDecorator} from '@storybook/react'
import {ThemeProvider, CSSReset} from '@chakra-ui/core'

addDecorator((storyFn) => (
<ThemeProvider>
<CSSReset />
{storyFn()}
</ThemeProvider>
))

1 comment on commit ec4e457

@kb-ally
Copy link

@kb-ally kb-ally commented on ec4e457 Jul 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import { ChakraProvider } from '@chakra-ui/react';

addDecorator((storyFn) => (
  <ChakraProvider theme={theme} resetCSS={false}>
    {storyFn()}
  </ChakraProvider>
))

Tried with this it is not working

Please sign in to comment.