-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
Copy pathpreview.ts
55 lines (51 loc) · 1.35 KB
/
preview.ts
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
/* eslint-disable import/extensions, import/no-unresolved */
import { setCompodocJson } from '@storybook/addon-docs/angular';
import addCssWarning from '../src/cssWarning';
import docJson from '../documentation.json';
// remove ButtonComponent to test #12009
const filtered = !docJson?.components
? docJson
: {
...docJson,
components: docJson.components.filter((c) => c.name !== 'ButtonComponent'),
};
setCompodocJson(filtered);
addCssWarning();
export const parameters = {
docs: {
inlineStories: true,
},
options: {
storySort: {
order: ['Welcome', 'Core ', 'Addons ', 'Basics '],
},
},
};
export const globalTypes = {
theme: {
name: 'Theme',
description: 'Global theme for components',
defaultValue: 'light',
toolbar: {
icon: 'paintbrush',
items: [
{ value: 'light', title: 'Light theme' },
{ value: 'dark', title: 'Dark theme' },
],
},
},
locale: {
name: 'Locale',
description: 'Internationalization locale',
defaultValue: 'en',
toolbar: {
icon: 'globe',
items: [
{ value: 'en', right: '🇺🇸', title: 'English' },
{ value: 'es', right: '🇪🇸', title: 'Español' },
{ value: 'zh', right: '🇨🇳', title: '中文' },
{ value: 'kr', right: '🇰🇷', title: '한국어' },
],
},
},
};