Updated get-started.

This commit is contained in:
Mauricio Rivera 2023-03-23 19:05:10 -05:00
parent d1be186445
commit b0b4a48568
2 changed files with 24 additions and 1 deletions

View File

@ -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',
'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.story-function.js.mdx',
'solid/storybook-preview-with-styled-components-decorator.ts.mdx',
]}
/>

View File

@ -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;
```