@colisweb/rescript-toolkit 3.1.1 → 3.1.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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -35,6 +35,7 @@ let components: array<(string, module(Config))> = [
35
35
  ("Form", module(Playground_Form)),
36
36
  ("Combobox", module(Playground_Combobox)),
37
37
  ("IconButton", module(Playground_IconButton)),
38
+ ("CopyWrapper", module(Playground_CopyWrapper)),
38
39
  ]
39
40
 
40
41
  module List = {
@@ -0,0 +1,17 @@
1
+ @module("@root/src/ui/Toolkit__Ui_CopyWrapper.resi?raw")
2
+ external resi: string = "default"
3
+
4
+ @module("@root/playground/components/Playground_CopyWrapper.res?raw")
5
+ external codeExample: string = "default"
6
+
7
+ @react.component
8
+ let make = () => {
9
+ <ReactIntl.IntlProvider>
10
+ <Toolkit__Ui_Snackbar.Provider />
11
+ <div className="flex flex-col gap-8">
12
+ <Toolkit__Ui_CopyWrapper textToCopy={"some content"} intl={PlaygroundLocales.intl}>
13
+ {"some content"->React.string}
14
+ </Toolkit__Ui_CopyWrapper>
15
+ </div>
16
+ </ReactIntl.IntlProvider>
17
+ }
@@ -18,7 +18,7 @@ let make = (~children, ~textToCopy, ~className="", ~intl) => {
18
18
  <div className={cx(["rounded-md border border-info-500 bg-info-50", className])}>
19
19
  <div className="relative w-full">
20
20
  <div
21
- className="absolute -right-2 top-1 p-1 bg-info-50 text-info-500"
21
+ className="absolute -right-2 top-1 p-1 bg-info-50 text-info-500 cursor-pointer hover:bg-info-400 hover:text-white rounded active:bg-info-500"
22
22
  onClick={_ => {
23
23
  ref1Clipboard.copy()
24
24
  }}>
@@ -0,0 +1,7 @@
1
+ @react.component
2
+ let make: (
3
+ ~children: React.element,
4
+ ~textToCopy: string,
5
+ ~className: string=?,
6
+ ~intl: ReactIntl.Intl.t,
7
+ ) => React.element
@@ -64,7 +64,7 @@ module ReactSelectMultiple = {
64
64
  ~placeholder: option<string>=?,
65
65
  ~className: option<string>=?,
66
66
  ~classNamePrefix: option<string>=?,
67
- ~defaultValue: array<labelOption<'value>>,
67
+ ~defaultValue: option<array<labelOption<'value>>>=?,
68
68
  ~value: option<array<labelOption<'value>>>=?,
69
69
  ~onChange: array<labelOption<'value>> => unit,
70
70
  ~options: array<labelOption<'value>>,
@@ -82,7 +82,7 @@ module ReactSelectMultiple = {
82
82
  ?className
83
83
  ?classNamePrefix
84
84
  ?value
85
- defaultValue
85
+ ?defaultValue
86
86
  onChange
87
87
  options
88
88
  ?noOptionsMessage