@colisweb/rescript-toolkit 2.25.0 → 2.25.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": "2.25.0",
3
+ "version": "2.25.1",
4
4
  "scripts": {
5
5
  "clean": "rescript clean",
6
6
  "build": "rescript build",
@@ -7,6 +7,7 @@ type item = {
7
7
  icon: React.element,
8
8
  label: React.element,
9
9
  onClick: unit => unit,
10
+ className: string,
10
11
  }
11
12
 
12
13
  @react.component
@@ -142,12 +143,13 @@ let make = (
142
143
  isXs ? "bg-white p-2 mx-2 shadow rounded-t-lg" : "",
143
144
  ])}>
144
145
  {items
145
- ->Array.mapWithIndex((i, {icon, label, onClick}) => {
146
+ ->Array.mapWithIndex((i, {icon, label, onClick, className}) => {
146
147
  <div
147
148
  onClick={_ => onClick()}
148
149
  className={cx([
149
150
  "flex flex-row gap-4 items-center py-2 hover:bg-neutral-100 focus:bg-neutral-100 cursor-pointer",
150
151
  i == 0 ? "" : "border-t",
152
+ className,
151
153
  ])}
152
154
  key={i->Int.toString}>
153
155
  {icon} {label}
@@ -7,6 +7,7 @@ type item = {
7
7
  icon: React.element,
8
8
  label: React.element,
9
9
  onClick: unit => unit,
10
+ className: string,
10
11
  }
11
12
 
12
13
  @react.component