@colisweb/rescript-toolkit 5.6.10 → 5.7.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "5.6.10",
3
+ "version": "5.7.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -5,6 +5,7 @@ let make = (
5
5
  ~className="",
6
6
  ~textClassName="",
7
7
  ~copyButtonSize=9,
8
+ ~onReferenceClick=?,
8
9
  ) => {
9
10
  let refClipboard = Toolkit__Hooks.useClipboard(reference, ~onCopyNotificationMessage?)
10
11
 
@@ -13,7 +14,9 @@ let make = (
13
14
  "flex flex-row items-center bg-info-50 text-info-700 min-w-0 w-full",
14
15
  className,
15
16
  ])}>
16
- <p className={cx(["font-mono w-full text-sm pl-2 truncate", textClassName])}>
17
+ <p
18
+ onClick={_ => onReferenceClick->Option.forEach(fn => fn())}
19
+ className={cx(["font-mono w-full text-sm pl-2 truncate", textClassName])}>
17
20
  {reference->React.string}
18
21
  </p>
19
22
  <Toolkit__Ui_IconButton
@@ -9,4 +9,5 @@ let make: (
9
9
  ~className: string=?,
10
10
  ~textClassName: string=?,
11
11
  ~copyButtonSize: int=?,
12
+ ~onReferenceClick: unit => unit=?,
12
13
  ) => React.element