@@ -23,14 +23,17 @@ export const globalTypes = {
23
23
name : "Icon behavior" ,
24
24
description : "Set the behavior for the icons" ,
25
25
defaultValue : Constants . ICON_BEHAVIOR . ON_HOVER ,
26
- options : [
27
- Constants . ICON_BEHAVIOR . ON_HOVER ,
28
- Constants . ICON_BEHAVIOR . ENABLE ,
29
- Constants . ICON_BEHAVIOR . DISABLE ,
30
- ] ,
31
- control : { type : "radio" } ,
26
+ toolbar : {
27
+ icon : "photo" ,
28
+ items : [
29
+ { value : Constants . ICON_BEHAVIOR . ON_HOVER , title : "onHover" } ,
30
+ { value : Constants . ICON_BEHAVIOR . ENABLE , title : "Enabled" } ,
31
+ { value : Constants . ICON_BEHAVIOR . DISABLE , title : "Disabled" } ,
32
+ ] ,
33
+ dynamicTitle : true ,
34
+ } ,
32
35
} ,
33
- locale2 : {
36
+ locale : {
34
37
description : "Internationalization locale" ,
35
38
defaultValue : "en" ,
36
39
toolbar : {
@@ -42,30 +45,47 @@ export const globalTypes = {
42
45
dynamicTitle : true ,
43
46
} ,
44
47
} ,
45
- locale : {
46
- name : "Locale" ,
47
- description : "Internationalization locale" ,
48
- defaultValue : "en" ,
49
- options : [ "en" , "cs" ] ,
50
- control : { type : "radio" } ,
51
- } ,
52
48
debugMode : {
53
49
name : "Debug Mode" ,
54
50
description : "Show irrelevant questions" ,
55
51
defaultValue : false ,
56
- control : { type : "boolean" } ,
52
+ toolbar : {
53
+ title : "Debug mode" ,
54
+ icon : "beaker" ,
55
+ items : [
56
+ { value : true , title : "On" } ,
57
+ { value : false , title : "Off" } ,
58
+ ] ,
59
+ } ,
57
60
} ,
58
61
horizontalNavBar : {
59
62
name : "Toggle Horizontal Navigation Bar" ,
60
63
description : "Set the navigation bar to horizontal" ,
61
64
defaultValue : false ,
62
- control : { type : "boolean" } ,
65
+ toolbar : {
66
+ icon : "expandalt" ,
67
+ items : [
68
+ { value : true , title : "On" } ,
69
+ { value : false , title : "Off" } ,
70
+ ] ,
71
+ } ,
63
72
} ,
64
73
timeOut : {
65
74
name : "Time Out (ms)" ,
66
75
description : "Set time-out for possible values (in ms)" ,
67
76
defaultValue : 1500 ,
68
- control : { type : "number" , min : 0 , max : 10000 , step : 500 } ,
77
+ toolbar : {
78
+ title : "Time Out (ms)" ,
79
+ icon : "timer" ,
80
+ items : [
81
+ { value : 200 , title : "200 ms" } ,
82
+ { value : 500 , title : "500 ms" } ,
83
+ { value : 1000 , title : "1000 ms" } ,
84
+ { value : 1500 , title : "1500 ms" } ,
85
+ { value : 2000 , title : "2000 ms" } ,
86
+ { value : 2500 , title : "2500 ms" } ,
87
+ ] ,
88
+ } ,
69
89
} ,
70
90
} ;
71
91
@@ -120,13 +140,12 @@ const preview = {
120
140
( Story , context ) => (
121
141
< ConfigurationContextProvider options = { options } >
122
142
< FormGenContextProvider fetchTypeAheadValues = { fetchTypeAheadValues } >
123
- < IntlContextProvider locale = { context . globals . locale2 } >
143
+ < IntlContextProvider locale = { context . globals . locale } >
124
144
< Story />
125
145
</ IntlContextProvider >
126
146
</ FormGenContextProvider >
127
147
</ ConfigurationContextProvider >
128
148
) ,
129
149
] ,
130
150
} ;
131
-
132
151
export default preview ;
0 commit comments