77import React , { StrictMode } from 'react' ;
88import { configure , addDecorator } from '@storybook/react' ;
99
10- import { ThemeProvider } from '../src/styles' ;
11- import { ThemeProvider as TreatThemeProvider } from '../src/styles/treat' ;
12- import { Baseline } from '../src/Baseline' ;
13- import { Text } from '../src/Text' ;
10+ import { Small } from '../src/Typography' ;
1411import { Button } from '../src/Button' ;
1512
13+ // theme
14+ import { ThemeProvider , createTheme } from '../src/styles/theme' ;
15+ import { themeRef } from './theme.treat' ;
16+ import { TreatProvider } from 'react-treat' ;
17+ import '../src/styles/baseline.treat' ;
18+
1619const req = require . context ( '../__stories__' , true , / \. s t o r i e s \. t s x $ / ) ;
1720
1821function loadStories ( ) {
1922 req . keys ( ) . forEach ( req ) ;
2023}
2124
22- import { theme } from './theme' ;
23- import { themeRef } from './theme.treat' ;
24-
2525addDecorator ( ( story ) => (
2626 < StrictMode >
27- < ThemeProvider theme = { theme } >
28- < TreatThemeProvider themeRef = { themeRef } theme = { theme } >
29- < Baseline />
27+ < ThemeProvider theme = { createTheme ( ) } >
28+ < TreatProvider theme = { themeRef } >
3029 < div
3130 style = { {
3231 position : 'relative' ,
@@ -39,10 +38,9 @@ addDecorator((story) => (
3938 >
4039 < div style = { { flex : 1 } } > { story ( ) } </ div >
4140 < div style = { { opacity : 0.4 , margin : '2em 0 1em 0' } } >
42- < Text size = "tiny" >
41+ < Small >
4342 Design by:
4443 < Button
45- size = "tiny"
4644 variant = "link"
4745 component = { ( { children, ...rest } ) => (
4846 < a { ...rest } href = "http://saismo.at/" target = "_blank" >
@@ -52,10 +50,10 @@ addDecorator((story) => (
5250 >
5351 saismo
5452 </ Button >
55- </ Text >
53+ </ Small >
5654 </ div >
5755 </ div >
58- </ TreatThemeProvider >
56+ </ TreatProvider >
5957 </ ThemeProvider >
6058 </ StrictMode >
6159) ) ;
0 commit comments