11[@ bs . val ] [@ bs . module "@storybook/addon-knobs/react" ]
2- external withKnobs : Main . decorator =
3- "" ;
2+ external withKnobs : Main . decorator = "" ;
43
54[@ bs . val ] [@ bs . module "@storybook/addon-knobs/react" ]
6- external extText : (string , Js . null_undefined (string )) => string =
7- "text" ;
5+ external extText : (string , Js . null_undefined (string )) => string = "text" ;
86
97let text = (~label: string , ~defaultValue: option (string )=?, () ) =>
10- extText(label, Js . Nullable . from_opt (defaultValue));
8+ extText(label, Js . Nullable . fromOption (defaultValue));
119
1210[@ bs . val ] [@ bs . module "@storybook/addon-knobs/react" ]
13- external extBoolean : (string , Js . boolean ) => Js . boolean =
14- "boolean" ;
11+ external extBoolean : (string , bool ) => bool = "boolean" ;
1512
16- let boolean = (~label: string , ~defaultValue= Js . false_ , () ) =>
17- Js . to_bool( extBoolean(label, defaultValue) );
13+ let boolean = (~label: string , ~defaultValue= false , () ) =>
14+ extBoolean(label, defaultValue);
1815
1916type jsRangeConfig = {
2017 .
21- "range": Js . boolean , "min": float , "max": float , "step": float
18+ "range": bool ,
19+ "min": float ,
20+ "max": float ,
21+ "step": float ,
2222};
2323
2424[@ bs . val ] [@ bs . module "@storybook/addon-knobs/react" ]
25- external extNumber : (string , float , Js . null_undefined (jsRangeConfig )) => float =
25+ external extNumber :
26+ (string , float , Js . null_undefined (jsRangeConfig )) => float =
2627 "number" ;
2728
2829type rangeConfig = {
2930 min: float ,
3031 max: float ,
31- step: float
32+ step: float ,
3233};
3334
3435let number =
3536 (
3637 ~label: string ,
3738 ~defaultValue= 0 .,
3839 ~rangeConfiguration: option (rangeConfig )=?,
39- ()
40+ () ,
4041 )
4142 : float =>
42- switch rangeConfiguration {
43+ switch ( rangeConfiguration) {
4344 | None => extNumber(label, defaultValue, Js . Nullable . undefined)
4445 | Some (c ) =>
45- let config = {
46- "range" : Js . true_,
47- "min" : c. min,
48- "max" : c. max,
49- "step" : c. step
50- };
51- extNumber(label, defaultValue, Js . Nullable . return(config))
46+ let config = {"range" : true , "min" : c. min, "max" : c. max, "step" : c. step};
47+ extNumber(label, defaultValue, Js . Nullable . return(config));
5248 };
5349
5450[@ bs . val ] [@ bs . module "@storybook/addon-knobs/react" ]
55- external extColor : (string , Js . null_undefined (string )) => string =
56- "color" ;
51+ external extColor : (string , Js . null_undefined (string )) => string = "color" ;
5752
5853let color = (~label: string , ~defaultValue: option (string )=?, () ) =>
59- extColor(label, Js . Nullable . from_opt (defaultValue));
54+ extColor(label, Js . Nullable . fromOption (defaultValue));
6055
6156type selectConfig (' a ) = 'a;
6257
@@ -70,19 +65,20 @@ let select =
7065 ~label: string ,
7166 ~options: selectConfig (' a ),
7267 ~defaultValue: option (string )=?,
73- ()
68+ () ,
7469 ) =>
75- extSelect(label, options, Js . Nullable . from_opt (defaultValue));
70+ extSelect(label, options, Js . Nullable . fromOption (defaultValue));
7671
7772[@ bs . val ] [@ bs . module "@storybook/addon-knobs/react" ]
78- external extDate : (string , Js . null_undefined (Js_date . t )) => string =
79- "date" ;
73+ external extDate : (string , Js . null_undefined (Js_date . t )) => string = "date" ;
8074
8175let date = (~label: string , ~defaultValue: option (Js_date . t )=?, () ) =>
82- extDate(label, Js . Nullable . from_opt(defaultValue));
76+ extDate(label, Js . Nullable . fromOption(defaultValue));
77+
78+ type button ;
8379
8480[@ bs . val ] [@ bs . module "@storybook/addon-knobs/react" ]
85- external extButton : (string , ReactEventRe . Mouse . t => unit ) => unit =
81+ external extButton : (string , ReactEventRe . Mouse . t => unit ) => button =
8682 "button" ;
8783
8884let button = (~label: string , ~handler: ReactEventRe . Mouse . t => unit , () ) =>
0 commit comments