-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathstory.args.js
56 lines (54 loc) · 1.32 KB
/
story.args.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
export const args = {
inputfield: false,
locale: 'de-CH',
year: 2020,
month: 4,
day: 22,
allowedyears: ['1971-2000', 2012, 2014, '2018-2022', 2023],
disabled: false,
autofocus: false,
checkMark: false,
label: '',
monthtitle: 'Choose Month',
yeartitle: 'Choose Year',
invaliddatetext: 'Invalid date',
invalid: false,
placeholder: 'Please select a date',
marginTop: 0,
width: '',
};
const locales = {
'de-CH': 'de-CH',
'it-CH': 'it-CH',
'fr-CH': 'fr-CH',
'en-CH': 'en-CH',
'en-GB': 'en-GB',
'it-IT': 'it-IT',
'invalid/ unsupported': 'ff-XX', // To show the default language fallback scenario
};
export const argTypes = {
inputfield: {
control: 'boolean',
},
locale: {
control: 'select',
options: Object.keys(locales),
mapping: locales,
labels: locales,
},
year: { control: 'number' },
month: { control: 'number' },
day: { control: 'number' },
allowedyears: { control: 'object' },
disabled: { control: 'boolean' },
autofocus: { control: 'boolean' },
checkMark: { control: 'boolean' },
label: { control: 'text' },
monthtitle: { control: 'text' },
yeartitle: { control: 'text' },
invaliddatetext: { control: 'text' },
invalid: { control: 'boolean' },
placeholder: { control: 'text' },
marginTop: { control: 'number' },
width: { control: 'text' },
};