1
+ import { configure , addDecorator , addParameters } from '@storybook/html' ;
2
+ import { create } from '@storybook/theming'
3
+ import { withTests } from "@storybook/addon-jest" ;
4
+ import results from "../jest-test-results.json" ;
5
+
6
+ const theme = create ( {
7
+ base : 'light' ,
8
+
9
+ /*
10
+ colorPrimary: 'hotpink',
11
+ colorSecondary: 'deepskyblue',
12
+ // UI
13
+ appBg: 'white',
14
+ appContentBg: 'white',
15
+ appBorderColor: 'grey',
16
+ appBorderRadius: 4,
17
+
18
+ // Typography
19
+ fontBase: '"Open Sans", sans-serif',
20
+ fontCode: 'monospace',
21
+
22
+ // Text colors
23
+ textColor: 'black',
24
+ textInverseColor: 'rgba(255,255,255,0.9)',
25
+
26
+ // Toolbar default and active colors
27
+ barTextColor: 'silver',
28
+ barSelectedColor: 'black',
29
+ barBg: 'white',
30
+
31
+ // Form colors
32
+ inputBg: 'white',
33
+ inputBorder: 'silver',
34
+ inputTextColor: 'black',
35
+ inputBorderRadius: 4,
36
+ */
37
+ brandTitle : 'Purple Web Components' ,
38
+ //brandUrl: 'https://example.com',
39
+ //brandImage: 'https://www.purple-technology.com/2072473f6e8356bd743b97387b175fc28c03139e/images/icons/logo-menu2x.png',
40
+ } )
41
+
42
+ addParameters ( {
43
+ options : {
44
+ theme
45
+ }
46
+ } )
47
+
48
+ addDecorator (
49
+ withTests ( {
50
+ results,
51
+ filesExt : ".spec.ts"
52
+ } )
53
+ ) ;
54
+
55
+ const req = require . context ( "../src" , true , / \. s t o r i e s \. j s $ / ) ;
56
+ function loadStories ( ) {
57
+ req . keys ( ) . forEach ( filename => req ( filename ) ) ;
58
+ }
59
+ configure ( loadStories , module ) ;
0 commit comments