@colisweb/rescript-toolkit 3.5.1 → 3.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "3.5.1",
3
+ "version": "3.5.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -693,14 +693,28 @@ module Make = (StateLenses: Config) => {
693
693
 
694
694
  module Switch = {
695
695
  @react.component
696
- let make = (~field, ~label=?, ~id, ~size=?) =>
696
+ let make = (
697
+ ~field,
698
+ ~label=?,
699
+ ~id,
700
+ ~size=?,
701
+ ~displayTitle=?,
702
+ ~switchClassName=?,
703
+ ~labelClassName=?,
704
+ ) =>
697
705
  <Form.Field
698
706
  field
699
707
  render={({handleChange, value}) => <>
700
- {label->Option.mapWithDefault(React.null, label =>
701
- <Toolkit__Ui_Label htmlFor=id> label </Toolkit__Ui_Label>
702
- )}
703
- <Toolkit__Ui_Switch onChange={value => handleChange(value)} name=id checked=value ?size />
708
+ <Toolkit__Ui_Switch
709
+ ?label
710
+ onChange={value => handleChange(value)}
711
+ name=id
712
+ checked=value
713
+ ?size
714
+ ?displayTitle
715
+ ?switchClassName
716
+ className=?{labelClassName}
717
+ />
704
718
  </>}
705
719
  />
706
720
  }