File tree Expand file tree Collapse file tree 6 files changed +42
-127
lines changed
src/platform/packages/shared/kbn-storybook/src/lib Expand file tree Collapse file tree 6 files changed +42
-127
lines changed Original file line number Diff line number Diff line change 15721572 "@storybook/components" : " ^8.6.3" ,
15731573 "@storybook/core-events" : " ^8.6.3" ,
15741574 "@storybook/core-server" : " ^8.6.3" ,
1575- "@storybook/icons" : " ^1.3.2" ,
15761575 "@storybook/manager-api" : " ^8.6.3" ,
15771576 "@storybook/preview-api" : " ^8.6.3" ,
15781577 "@storybook/react" : " ^8.6.3" ,
Original file line number Diff line number Diff line change 1010import type { Preview } from '@storybook/react' ;
1111import * as jest from 'jest-mock' ;
1212import { decorators } from './decorators' ;
13+ import {
14+ AMSTERDAM_DARK ,
15+ AMSTERDAM_LIGHT ,
16+ BOREALIS_DARK ,
17+ BOREALIS_LIGHT ,
18+ DEFAULT_THEME ,
19+ THEME_TITLES ,
20+ } from './themes' ;
1321
1422// @ts -expect-error
1523window . jest = jest ;
1624
1725const preview : Preview = {
1826 decorators,
19- initialGlobals : { euiTheme : 'v8.light' } ,
27+ initialGlobals : { euiTheme : DEFAULT_THEME } ,
28+ globalTypes : {
29+ euiTheme : {
30+ description : 'Change the EUI theme' ,
31+ toolbar : {
32+ title : 'Theme' ,
33+ icon : 'paintbrush' ,
34+ dynamicTitle : true ,
35+ items : [
36+ {
37+ value : BOREALIS_LIGHT ,
38+ icon : 'hearthollow' ,
39+ title : THEME_TITLES [ BOREALIS_LIGHT ] ,
40+ } ,
41+ {
42+ value : BOREALIS_DARK ,
43+ icon : 'heart' ,
44+ title : THEME_TITLES [ BOREALIS_DARK ] ,
45+ } ,
46+ {
47+ value : AMSTERDAM_LIGHT ,
48+ icon : 'hearthollow' ,
49+ title : THEME_TITLES [ AMSTERDAM_LIGHT ] ,
50+ } ,
51+ {
52+ value : AMSTERDAM_DARK ,
53+ icon : 'heart' ,
54+ title : THEME_TITLES [ AMSTERDAM_DARK ] ,
55+ } ,
56+ ] ,
57+ } ,
58+ } ,
59+ } ,
2060} ;
2161
2262// eslint-disable-next-line import/no-default-export
Original file line number Diff line number Diff line change 99
1010import { addons } from '@storybook/manager-api' ;
1111import { create } from '@storybook/theming' ;
12- import { registerThemeSwitcherAddon } from './register_theme_switcher_addon' ;
1312
1413// This configures the "Manager", or main outer view of Storybook. It is an
1514// addon that's loaded by the `managerEntries` part of the preset in ../preset.js.
@@ -25,5 +24,3 @@ addons.setConfig({
2524 panelPosition : 'bottom' ,
2625 showToolbar : true ,
2726} ) ;
28-
29- registerThemeSwitcherAddon ( ) ;
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1029210292 resolved "https://registry.yarnpkg.com/@storybook/global/-/global-5.0.0.tgz#b793d34b94f572c1d7d9e0f44fac4e0dbc9572ed"
1029310293 integrity sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==
1029410294
10295- "@storybook/icons@^1.2.12", "@storybook/icons@^1.3.2" :
10295+ "@storybook/icons@^1.2.12":
1029610296 version "1.3.2"
1029710297 resolved "https://registry.yarnpkg.com/@storybook/icons/-/icons-1.3.2.tgz#e9b92c35ca789ff79f9d0b3848829dd6490ca628"
1029810298 integrity sha512-t3xcbCKkPvqyef8urBM0j/nP6sKtnlRkVgC+8JTbTAZQjaTmOjes3byEgzs89p4B/K6cJsg9wLW2k3SknLtYJw==
You can’t perform that action at this time.
0 commit comments