@colisweb/rescript-toolkit 5.40.0 → 5.40.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "5.40.0",
3
+ "version": "5.40.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -11,7 +11,7 @@ type options = array<item>
11
11
  @react.component
12
12
  let make = (
13
13
  ~options: options,
14
- ~placeholder: React.element,
14
+ ~placeholder: option<React.element>=?,
15
15
  ~buttonClassName="",
16
16
  ~dropdownClassName="",
17
17
  ~itemClassName="",
@@ -59,7 +59,9 @@ let make = (
59
59
  label={switch selectedOptions {
60
60
  | [] =>
61
61
  <p className="flex flex-row gap-2 w-full items-center relative">
62
- <span className="ml-1"> {placeholder} </span>
62
+ {placeholder->Option.mapWithDefault(React.null, placeholder => {
63
+ <span className="ml-1"> {placeholder} </span>
64
+ })}
63
65
  <span className="absolute inset-y-0 right-0 flex items-center">
64
66
  <ReactIcons.FaAngleDown />
65
67
  </span>
@@ -9,7 +9,7 @@ type options = array<item>
9
9
  @react.component
10
10
  let make: (
11
11
  ~options: array<item>,
12
- ~placeholder: React.element,
12
+ ~placeholder: React.element=?,
13
13
  ~buttonClassName: string=?,
14
14
  ~dropdownClassName: string=?,
15
15
  ~itemClassName: string=?,
@@ -19,5 +19,5 @@ let make: (
19
19
  ~onChange: array<item> => unit,
20
20
  ~disabled: bool=?,
21
21
  ~onClose: unit => unit=?,
22
- ~displaySelectOnlyOption:bool=?
22
+ ~displaySelectOnlyOption: bool=?,
23
23
  ) => React.element