mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 15:52:19 +08:00
Updated get-started.
This commit is contained in:
parent
d1be186445
commit
b0b4a48568
@ -87,7 +87,7 @@ Use [decorators](../writing-stories/decorators.md) to “wrap” every story in
|
|||||||
'vue/storybook-preview-with-mixin-decorator.mixin-2.ts.mdx',
|
'vue/storybook-preview-with-mixin-decorator.mixin-2.ts.mdx',
|
||||||
'angular/storybook-preview-with-styled-components-decorator.ts.mdx',
|
'angular/storybook-preview-with-styled-components-decorator.ts.mdx',
|
||||||
'solid/storybook-preview-with-styled-components-decorator.js.mdx',
|
'solid/storybook-preview-with-styled-components-decorator.js.mdx',
|
||||||
'solid/storybook-preview-with-styled-components-decorator.story-function.js.mdx',
|
'solid/storybook-preview-with-styled-components-decorator.ts.mdx',
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
```tsx
|
||||||
|
// .storybook/preview.tsx
|
||||||
|
import { Preview } from 'storybook-solidjs';
|
||||||
|
import { ThemeProvider, DefaultTheme } from 'solid-styled-components';
|
||||||
|
|
||||||
|
const theme: DefaultTheme = {
|
||||||
|
colors: {
|
||||||
|
primary: 'hotpink',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const preview: Preview = {
|
||||||
|
decorators: [
|
||||||
|
(Story) => (
|
||||||
|
<ThemeProvider theme={theme}>
|
||||||
|
<Story />
|
||||||
|
</ThemeProvider>
|
||||||
|
),
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default preview;
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user