-
Notifications
You must be signed in to change notification settings - Fork 356
/
preview.js
58 lines (53 loc) · 1.21 KB
/
preview.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import darkTheme from './theme/covalent.dark.theme';
import lightTheme from './theme/covalent.light.theme';
import '!style-loader!css-loader!sass-loader!./theme/markdown-elements.scss';
import anysort from 'anysort';
export const parameters = {
options: {
storySort: (previous, next) => {
const [previousStory, previousMeta] = previous;
const [nextStory, nextMeta] = next;
return anysort(previousMeta.kind, nextMeta.kind, [
'Introduction',
'Guides/**',
'Patterns/**',
'Basics/**',
'Components/**/Overview',
]);
},
},
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
backgrounds: {
default: 'twitter',
values: [
{
name: 'twitter',
value: '#00aced',
},
{
name: 'facebook',
value: '#3b5998',
},
],
grid: {
disable: true,
},
},
darkMode: {
// Override the default dark theme
dark: {
...darkTheme,
},
// Override the default light theme
light: lightTheme,
// Add dark and light class to preview
stylePreview: true,
},
layout: 'centered',
};