@colisweb/rescript-toolkit 4.15.1 → 4.15.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.
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ let make = (
|
|
|
26
26
|
~buttonColor: Toolkit__Ui_Button.color=#white,
|
|
27
27
|
~buttonSize: Toolkit__Ui_Button.size=#md,
|
|
28
28
|
~buttonVariant: Toolkit__Ui_Button.variant=#default,
|
|
29
|
+
~buttonLeftIcon=?,
|
|
29
30
|
~position=#bottom,
|
|
30
31
|
~disabled: option<bool>=?,
|
|
31
32
|
~onClose: option<unit => unit>=?,
|
|
@@ -77,6 +78,7 @@ let make = (
|
|
|
77
78
|
size=buttonSize
|
|
78
79
|
?disabled
|
|
79
80
|
type_="button"
|
|
81
|
+
leftIcon=?{buttonLeftIcon}
|
|
80
82
|
color=buttonColor
|
|
81
83
|
buttonRef={ReactDOM.Ref.domRef(buttonRef)}
|
|
82
84
|
onClick={event => {
|
|
@@ -20,6 +20,7 @@ let make: (
|
|
|
20
20
|
~buttonColor: Toolkit__Ui_Button.color=?,
|
|
21
21
|
~buttonSize: Toolkit__Ui_Button.size=?,
|
|
22
22
|
~buttonVariant: Toolkit__Ui_Button.variant=?,
|
|
23
|
+
~buttonLeftIcon: module(ReactIcons.Icon)=?,
|
|
23
24
|
~position: position=?,
|
|
24
25
|
~disabled: bool=?,
|
|
25
26
|
~onClose: unit => unit=?,
|
|
@@ -94,6 +94,7 @@ let make = (
|
|
|
94
94
|
~buttonColor=?,
|
|
95
95
|
~buttonSize=?,
|
|
96
96
|
~buttonVariant=?,
|
|
97
|
+
~buttonLeftIcon=?,
|
|
97
98
|
~searchPlaceholder: option<string>=?,
|
|
98
99
|
~allowFilter=true,
|
|
99
100
|
~defaultValue: option<item>=?,
|
|
@@ -123,6 +124,7 @@ let make = (
|
|
|
123
124
|
?buttonColor
|
|
124
125
|
?buttonSize
|
|
125
126
|
?buttonVariant
|
|
127
|
+
?buttonLeftIcon
|
|
126
128
|
buttonClassName
|
|
127
129
|
onClose={_ => setSelectedOption(_ => defaultValue)}
|
|
128
130
|
dropdownClassName
|
|
@@ -131,9 +133,11 @@ let make = (
|
|
|
131
133
|
| None =>
|
|
132
134
|
<p className="flex flex-row gap-2 w-full items-center relative">
|
|
133
135
|
<span> {placeholder} </span>
|
|
134
|
-
|
|
135
|
-
<
|
|
136
|
-
|
|
136
|
+
{showCarret
|
|
137
|
+
? <span className="absolute inset-y-0 right-0 flex items-center">
|
|
138
|
+
<ReactIcons.FaAngleDown />
|
|
139
|
+
</span>
|
|
140
|
+
: React.null}
|
|
137
141
|
</p>
|
|
138
142
|
| Some(selectedOption) =>
|
|
139
143
|
<div className="table table-fixed w-full" title={selectedOption.label}>
|
|
@@ -13,6 +13,7 @@ let make: (
|
|
|
13
13
|
~buttonColor: Toolkit__Ui_Button.color=?,
|
|
14
14
|
~buttonSize: Toolkit__Ui_Button.size=?,
|
|
15
15
|
~buttonVariant: Toolkit__Ui_Button.variant=?,
|
|
16
|
+
~buttonLeftIcon: module(ReactIcons.Icon)=?,
|
|
16
17
|
~searchPlaceholder: string=?,
|
|
17
18
|
~allowFilter: bool=?,
|
|
18
19
|
~defaultValue: item=?,
|