24 lines
471 B
TypeScript
Raw Normal View History

2023-02-28 14:56:53 +01:00
import { Provider } from '../src'
2023-01-13 15:52:08 +01:00
import { Parameters, Decorator } from '@storybook/react'
2023-01-10 12:24:24 +01:00
import './reset.css'
2023-01-13 15:52:08 +01:00
export const parameters: Parameters = {
2023-01-10 12:24:24 +01:00
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
2023-01-13 15:52:08 +01:00
date: /Date$/,
},
},
2023-01-10 12:24:24 +01:00
}
2023-01-13 15:52:08 +01:00
const withThemeProvider: Decorator = (Story, _context) => {
2023-01-10 12:24:24 +01:00
return (
2023-02-28 14:56:53 +01:00
<Provider>
2023-01-10 12:24:24 +01:00
<Story />
2023-02-28 14:56:53 +01:00
</Provider>
2023-01-10 12:24:24 +01:00
)
}
export const decorators = [withThemeProvider]