@@ -72,6 +72,13 @@ export const parameters = {
72
72
}
73
73
return bladeTheme ;
74
74
} ;
75
+
76
+ if ( context . store . globals . globals . version === '10' && window . top ) {
77
+ window . top . location . href =
78
+ 'https://v10--61c19ee8d3d282003ac1d81c.chromatic.com' +
79
+ window . top . location . pathname +
80
+ window . top . location . search ;
81
+ }
75
82
return (
76
83
< DocsContainer context = { context } >
77
84
< BladeProvider
@@ -146,6 +153,13 @@ export const decorators = [
146
153
return bladeTheme ;
147
154
} ;
148
155
156
+ if ( context . globals . version === '10' && window . top ) {
157
+ window . top . location . href =
158
+ 'https://v10--61c19ee8d3d282003ac1d81c.chromatic.com' +
159
+ window . top . location . pathname +
160
+ window . top . location . search ;
161
+ }
162
+
149
163
return (
150
164
< ErrorBoundary >
151
165
< GlobalStyle />
@@ -164,6 +178,23 @@ export const decorators = [
164
178
] ;
165
179
166
180
export const globalTypes = {
181
+ version : {
182
+ name : 'Blade Documentation Version' ,
183
+ description : 'Version of the Blade' ,
184
+ defaultValue : '11' ,
185
+ toolbar : {
186
+ icon : 'time' ,
187
+ title : ' v11 - Rebranded' ,
188
+ // Array of plain string values or MenuItem shape (see below)
189
+ items : [
190
+ { value : '10' , title : ' v10 - Old' } ,
191
+ { value : '11' , title : ' v11 - Rebranded' , default : true } ,
192
+ ] ,
193
+ dynamicTitle : true ,
194
+ // Property that specifies if the name of the item will be displayed
195
+ showName : false ,
196
+ } ,
197
+ } ,
167
198
colorScheme : {
168
199
name : 'Color Scheme' ,
169
200
description : 'Color Scheme for Blade' ,
0 commit comments