11import { Meta } from ' @storybook/addon-docs/blocks'
22import {
3- ThemeProvider ,
3+ ComponentsProvider ,
44 lightTheme ,
55 darkTheme ,
66 Flex ,
@@ -16,7 +16,7 @@ import { SemanticColors, Swatch, Colors, Surfaces } from './util'
1616
1717### Light
1818
19- <ThemeProvider local light = { lightTheme } choice = " light" >
19+ <ComponentsProvider theme = { { local: true , light: lightTheme , choice: ' light' } } >
2020 <Grid
2121 css = { {
2222 gridTemplateColumns: ' 1fr 1fr 1fr' ,
@@ -39,11 +39,11 @@ import { SemanticColors, Swatch, Colors, Surfaces } from './util'
3939 <SemanticColors key = " success" theme = { lightTheme } name = " success" />
4040 <SemanticColors key = " info" theme = { lightTheme } name = " info" />
4141 </Grid >
42- </ThemeProvider >
42+ </ComponentsProvider >
4343
4444### Dark
4545
46- <ThemeProvider local darkTheme = { darkTheme } choice = " dark" >
46+ <ComponentsProvider theme = { { local: true , dark: darkTheme , choice: ' dark' } } >
4747 <Grid
4848 css = { {
4949 gridTemplateColumns: ' 1fr 1fr 1fr' ,
@@ -66,7 +66,7 @@ import { SemanticColors, Swatch, Colors, Surfaces } from './util'
6666 <SemanticColors key = " success" theme = { darkTheme } name = " success" />
6767 <SemanticColors key = " info" theme = { darkTheme } name = " info" />
6868 </Grid >
69- </ThemeProvider >
69+ </ComponentsProvider >
7070
7171## Palettes
7272
@@ -75,7 +75,7 @@ These are themed and rand from 1-12, with 9 being the pure color from which the
7575
7676### Light
7777
78- <ThemeProvider local light = { lightTheme } choice = " light" >
78+ <ComponentsProvider theme = { { local: true , light: lightTheme , choice: ' light' } } >
7979 <Column css = { { p: ' $3' , py: ' $6' , backgroundColor: ' $paper' }} >
8080 <Colors key = " primary" theme = { lightTheme } name = " primary" />
8181 <Colors key = " grey" theme = { lightTheme } name = " grey" />
@@ -85,11 +85,11 @@ These are themed and rand from 1-12, with 9 being the pure color from which the
8585 <Colors key = " info" theme = { lightTheme } name = " info" />
8686 <Colors key = " transparency" theme = { lightTheme } name = " transparency" />
8787 </Column >
88- </ThemeProvider >
88+ </ComponentsProvider >
8989
9090### Dark
9191
92- <ThemeProvider local dark = { darkTheme } choice = " dark" >
92+ <ComponentsProvider theme = { { local: true , dark: darkTheme , choice: ' dark' } } >
9393 <Column css = { { p: ' $3' , py: ' $6' , backgroundColor: ' $paper' }} >
9494 <Colors key = " primary" theme = { darkTheme } name = " primary" />
9595 <Colors key = " grey" theme = { darkTheme } name = " grey" />
@@ -99,24 +99,26 @@ These are themed and rand from 1-12, with 9 being the pure color from which the
9999 <Colors key = " info" theme = { darkTheme } name = " info" />
100100 <Colors key = " transparency" theme = { darkTheme } name = " transparency" />
101101 </Column >
102- </ThemeProvider >
102+ </ComponentsProvider >
103103
104104## Brand Colors
105105
106106We use the brand colours within our main color sets differently for light and dark themes but full palettes are provided in both
107107themes.
108108
109109<>
110- <ThemeProvider local light = { lightTheme } choice = " light" >
110+ <ComponentsProvider
111+ theme = { { local: true , light: lightTheme , choice: ' light' }}
112+ >
111113 <Column css = { { p: ' $3' , py: ' $6' , backgroundColor: ' $paper' }} >
112114 <Colors key = " brandYellow" theme = { lightTheme } name = " brandYellow" />
113115 <Colors key = " brandGrey" theme = { lightTheme } name = " brandGrey" />
114116 </Column >
115- </ThemeProvider >
116- <ThemeProvider local dark = { darkTheme } choice = " dark" >
117+ </ComponentsProvider >
118+ <ComponentsProvider theme = { { local: true , dark: darkTheme , choice: ' dark' } } >
117119 <Column css = { { p: ' $3' , py: ' $6' , backgroundColor: ' $paper' }} >
118120 <Colors key = " brandYellow" theme = { darkTheme } name = " brandYellow" />
119121 <Colors key = " brandGrey" theme = { darkTheme } name = " brandGrey" />
120122 </Column >
121- </ThemeProvider >
123+ </ComponentsProvider >
122124</>
0 commit comments