1
1
import { Meta } from ' @storybook/addon-docs/blocks'
2
2
import {
3
- ThemeProvider ,
3
+ ComponentsProvider ,
4
4
lightTheme ,
5
5
darkTheme ,
6
6
Flex ,
@@ -16,7 +16,7 @@ import { SemanticColors, Swatch, Colors, Surfaces } from './util'
16
16
17
17
### Light
18
18
19
- <ThemeProvider local light = { lightTheme } choice = " light" >
19
+ <ComponentsProvider theme = { { local: true , light: lightTheme , choice: ' light' } } >
20
20
<Grid
21
21
css = { {
22
22
gridTemplateColumns: ' 1fr 1fr 1fr' ,
@@ -39,11 +39,11 @@ import { SemanticColors, Swatch, Colors, Surfaces } from './util'
39
39
<SemanticColors key = " success" theme = { lightTheme } name = " success" />
40
40
<SemanticColors key = " info" theme = { lightTheme } name = " info" />
41
41
</Grid >
42
- </ThemeProvider >
42
+ </ComponentsProvider >
43
43
44
44
### Dark
45
45
46
- <ThemeProvider local darkTheme = { darkTheme } choice = " dark" >
46
+ <ComponentsProvider theme = { { local: true , dark: darkTheme , choice: ' dark' } } >
47
47
<Grid
48
48
css = { {
49
49
gridTemplateColumns: ' 1fr 1fr 1fr' ,
@@ -66,7 +66,7 @@ import { SemanticColors, Swatch, Colors, Surfaces } from './util'
66
66
<SemanticColors key = " success" theme = { darkTheme } name = " success" />
67
67
<SemanticColors key = " info" theme = { darkTheme } name = " info" />
68
68
</Grid >
69
- </ThemeProvider >
69
+ </ComponentsProvider >
70
70
71
71
## Palettes
72
72
@@ -75,7 +75,7 @@ These are themed and rand from 1-12, with 9 being the pure color from which the
75
75
76
76
### Light
77
77
78
- <ThemeProvider local light = { lightTheme } choice = " light" >
78
+ <ComponentsProvider theme = { { local: true , light: lightTheme , choice: ' light' } } >
79
79
<Column css = { { p: ' $3' , py: ' $6' , backgroundColor: ' $paper' }} >
80
80
<Colors key = " primary" theme = { lightTheme } name = " primary" />
81
81
<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
85
85
<Colors key = " info" theme = { lightTheme } name = " info" />
86
86
<Colors key = " transparency" theme = { lightTheme } name = " transparency" />
87
87
</Column >
88
- </ThemeProvider >
88
+ </ComponentsProvider >
89
89
90
90
### Dark
91
91
92
- <ThemeProvider local dark = { darkTheme } choice = " dark" >
92
+ <ComponentsProvider theme = { { local: true , dark: darkTheme , choice: ' dark' } } >
93
93
<Column css = { { p: ' $3' , py: ' $6' , backgroundColor: ' $paper' }} >
94
94
<Colors key = " primary" theme = { darkTheme } name = " primary" />
95
95
<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
99
99
<Colors key = " info" theme = { darkTheme } name = " info" />
100
100
<Colors key = " transparency" theme = { darkTheme } name = " transparency" />
101
101
</Column >
102
- </ThemeProvider >
102
+ </ComponentsProvider >
103
103
104
104
## Brand Colors
105
105
106
106
We use the brand colours within our main color sets differently for light and dark themes but full palettes are provided in both
107
107
themes.
108
108
109
109
<>
110
- <ThemeProvider local light = { lightTheme } choice = " light" >
110
+ <ComponentsProvider
111
+ theme = { { local: true , light: lightTheme , choice: ' light' }}
112
+ >
111
113
<Column css = { { p: ' $3' , py: ' $6' , backgroundColor: ' $paper' }} >
112
114
<Colors key = " brandYellow" theme = { lightTheme } name = " brandYellow" />
113
115
<Colors key = " brandGrey" theme = { lightTheme } name = " brandGrey" />
114
116
</Column >
115
- </ThemeProvider >
116
- <ThemeProvider local dark = { darkTheme } choice = " dark" >
117
+ </ComponentsProvider >
118
+ <ComponentsProvider theme = { { local: true , dark: darkTheme , choice: ' dark' } } >
117
119
<Column css = { { p: ' $3' , py: ' $6' , backgroundColor: ' $paper' }} >
118
120
<Colors key = " brandYellow" theme = { darkTheme } name = " brandYellow" />
119
121
<Colors key = " brandGrey" theme = { darkTheme } name = " brandGrey" />
120
122
</Column >
121
- </ThemeProvider >
123
+ </ComponentsProvider >
122
124
</>
0 commit comments