dappconnect-sdks/packages/components/.storybook/preview.tsx

24 lines
551 B
TypeScript
Raw Normal View History

2023-01-10 11:24:24 +00:00
import React from 'react'
import { TamaguiProvider } from '@tamagui/core'
import { config } 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-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 (
<TamaguiProvider config={config}>
<Story />
</TamaguiProvider>
)
}
export const decorators = [withThemeProvider]