feat(component): enhance storybook preview (#943)

This commit is contained in:
Himself65 authored and GitHub committed 2023-02-10 15:14:10 +08:00
1 parent a6a8493c35
commit 6057c5637c
3 files changed
+65 -19

No files matched your search

+14
View File
@@ -1,3 +1,5 @@
import { getLightTheme, ThemeProvider } from '../src';
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
@@ -7,3 +9,15 @@ export const parameters = {
},
},
};
const lightTheme = getLightTheme('page');
export const decorators = [
Story => {
return (
<ThemeProvider theme={lightTheme}>
<Story />
</ThemeProvider>
);
},
];