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