@colisweb/rescript-toolkit 3.1.4 → 3.1.5
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/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ module Header = {
|
|
|
12
12
|
~action: option<action>=?,
|
|
13
13
|
~actionDisabled: option<bool>=?,
|
|
14
14
|
~containerClassName="",
|
|
15
|
+
~buttonTestId="",
|
|
15
16
|
) =>
|
|
16
17
|
<div className={cx(["flex flex-row items-center mb-4", containerClassName])}>
|
|
17
18
|
<div
|
|
@@ -21,17 +22,20 @@ module Header = {
|
|
|
21
22
|
])}>
|
|
22
23
|
children
|
|
23
24
|
</div>
|
|
24
|
-
{action->Option.mapWithDefault(React.null, ({label, event}) =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
{action->Option.mapWithDefault(React.null, ({label, event}) => {
|
|
26
|
+
let btn =
|
|
27
|
+
<Toolkit__Ui_Button
|
|
28
|
+
variant=#pill
|
|
29
|
+
size=#xs
|
|
30
|
+
color=#info
|
|
31
|
+
onClick={_ => event()}
|
|
32
|
+
disabled={actionDisabled->Option.getWithDefault(false)}
|
|
33
|
+
className="flex-shrink-0 ml-4">
|
|
34
|
+
label
|
|
35
|
+
</Toolkit__Ui_Button>
|
|
36
|
+
|
|
37
|
+
React.cloneElement(btn, {"data-testid": cx(["card-header-button", buttonTestId])})
|
|
38
|
+
})}
|
|
35
39
|
</div>
|
|
36
40
|
}
|
|
37
41
|
|
|
@@ -44,7 +48,9 @@ module Body = {
|
|
|
44
48
|
module FixedBody = {
|
|
45
49
|
@react.component
|
|
46
50
|
let make = (~className="", ~children=React.null) =>
|
|
47
|
-
<Body>
|
|
51
|
+
<Body>
|
|
52
|
+
<div className={cx([className, "overflow-y-auto h-full"])}> children </div>
|
|
53
|
+
</Body>
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
module Message = {
|
|
@@ -66,7 +72,10 @@ module Message = {
|
|
|
66
72
|
| #error => "text-danger-600 bg-danger-50"
|
|
67
73
|
}
|
|
68
74
|
|
|
69
|
-
<div className={cx([className, "px-6 py-4 flex", color])}>
|
|
75
|
+
<div className={cx([className, "px-6 py-4 flex", color])}>
|
|
76
|
+
icon
|
|
77
|
+
<div> children </div>
|
|
78
|
+
</div>
|
|
70
79
|
}
|
|
71
80
|
}
|
|
72
81
|
|