@colisweb/rescript-toolkit 5.30.5 → 5.31.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.30.5",
3
+ "version": "5.31.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -72,7 +72,7 @@ let make = (
72
72
  leaveTo="transform scale-95 opacity-0">
73
73
  <HeadlessUi.Listbox.Options
74
74
  static={true}
75
- className="absolute min-w-[250px] mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-20">
75
+ className="!absolute min-w-[250px] mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-20">
76
76
  {options
77
77
  ->Array.mapWithIndex((i, option) => {
78
78
  <HeadlessUi.Listbox.Option
@@ -55,6 +55,7 @@ let make = (
55
55
  ~type_=#default,
56
56
  ~footer=?,
57
57
  ~ariaLabel="",
58
+ ~icon: option<module(ReactIcons.Icon)>=?,
58
59
  ) =>
59
60
  <HeadlessUi.Dialog \"open"=isVisible onClose=hide className="relative z-50">
60
61
  <HeadlessUi.Dialog.Backdrop
@@ -88,7 +89,15 @@ let make = (
88
89
  ])}>
89
90
  {title->Option.mapWithDefault(React.null, title =>
90
91
  <HeadlessUi.Dialog.Title
91
- className={cx(["text-2xl pb-1 font-display", titleStyle(~type_)])}>
92
+ className={cx([
93
+ "text-2xl pb-1 inline-flex items-center gap-2 font-display",
94
+ titleStyle(~type_),
95
+ ])}>
96
+ {icon->Option.mapWithDefault(React.null, icon => {
97
+ let module(Icon) = icon
98
+
99
+ <Icon />
100
+ })}
92
101
  title
93
102
  </HeadlessUi.Dialog.Title>
94
103
  )}
@@ -12,4 +12,5 @@ let make: (
12
12
  ~type_: style=?, // default: `default
13
13
  ~footer: React.element=?,
14
14
  ~ariaLabel: string=?,
15
+ ~icon: module(ReactIcons.Icon)=?,
15
16
  ) => React.element