@colisweb/rescript-toolkit 5.40.0 → 5.40.2
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
|
@@ -11,8 +11,9 @@ 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
|
+
~placeholderClassName="",
|
|
16
17
|
~dropdownClassName="",
|
|
17
18
|
~itemClassName="",
|
|
18
19
|
~searchPlaceholder: option<string>=?,
|
|
@@ -59,7 +60,9 @@ let make = (
|
|
|
59
60
|
label={switch selectedOptions {
|
|
60
61
|
| [] =>
|
|
61
62
|
<p className="flex flex-row gap-2 w-full items-center relative">
|
|
62
|
-
|
|
63
|
+
{placeholder->Option.mapWithDefault(React.null, placeholder => {
|
|
64
|
+
<span className={cx(["ml-1", placeholderClassName])}> {placeholder} </span>
|
|
65
|
+
})}
|
|
63
66
|
<span className="absolute inset-y-0 right-0 flex items-center">
|
|
64
67
|
<ReactIcons.FaAngleDown />
|
|
65
68
|
</span>
|
|
@@ -9,8 +9,9 @@ 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
|
+
~placeholderClassName: string=?,
|
|
14
15
|
~dropdownClassName: string=?,
|
|
15
16
|
~itemClassName: string=?,
|
|
16
17
|
~searchPlaceholder: string=?,
|
|
@@ -19,5 +20,5 @@ let make: (
|
|
|
19
20
|
~onChange: array<item> => unit,
|
|
20
21
|
~disabled: bool=?,
|
|
21
22
|
~onClose: unit => unit=?,
|
|
22
|
-
~displaySelectOnlyOption:bool
|
|
23
|
+
~displaySelectOnlyOption: bool=?,
|
|
23
24
|
) => React.element
|