Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Add <ThemeProvider /> global decorator to Storybook. #14

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
import React from 'react';
import { ThemeProvider } from '@theme-ui/theme-provider';
import { defaultTheme } from '../themes/defaultTheme';

export const decorators = [
(Story) => (
<ThemeProvider theme={defaultTheme}>
<Story />
</ThemeProvider>
),
];

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
Expand Down