@colisweb/rescript-toolkit 5.2.0 → 5.3.0
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
|
@@ -12,9 +12,11 @@ let make = (
|
|
|
12
12
|
~name=?,
|
|
13
13
|
~checked=?,
|
|
14
14
|
~className="",
|
|
15
|
+
~contentClassName="",
|
|
15
16
|
~size: size=#sm,
|
|
16
17
|
~variant: variant=Default,
|
|
17
|
-
)
|
|
18
|
+
~icon: option<module(ReactIcons.Icon)>=?,
|
|
19
|
+
) => {
|
|
18
20
|
<label
|
|
19
21
|
className={cx([
|
|
20
22
|
"flex items-center cw-radio relative",
|
|
@@ -79,13 +81,28 @@ let make = (
|
|
|
79
81
|
</span>
|
|
80
82
|
<span
|
|
81
83
|
className={cx([
|
|
84
|
+
"flex flex-row items-center gap-2",
|
|
82
85
|
{
|
|
83
86
|
switch variant {
|
|
84
87
|
| Default => ""
|
|
85
88
|
| Filled => "peer-checked:text-white relative pr-1"
|
|
86
89
|
}
|
|
87
90
|
},
|
|
91
|
+
contentClassName,
|
|
88
92
|
])}>
|
|
93
|
+
{icon->Option.mapWithDefault(React.null, icon => {
|
|
94
|
+
let module(Icon) = icon
|
|
95
|
+
|
|
96
|
+
<Icon
|
|
97
|
+
size={switch size {
|
|
98
|
+
| #lg => 26
|
|
99
|
+
| #md => 24
|
|
100
|
+
| #sm => 20
|
|
101
|
+
| #xs => 16
|
|
102
|
+
}}
|
|
103
|
+
/>
|
|
104
|
+
})}
|
|
89
105
|
{children->Option.getWithDefault(React.null)}
|
|
90
106
|
</span>
|
|
91
107
|
</label>
|
|
108
|
+
}
|