@colisweb/rescript-toolkit 2.30.0 → 2.32.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
|
@@ -4,23 +4,36 @@ type status = [#success | #error | #warning | #info]
|
|
|
4
4
|
let make = (~title, ~description=?, ~status, ~className=?) =>
|
|
5
5
|
<div
|
|
6
6
|
className={cx([
|
|
7
|
-
"py-2 px-4 flex items-center",
|
|
7
|
+
"py-2 px-4 flex items-center border rounded",
|
|
8
8
|
switch status {
|
|
9
|
-
| #success => "bg-success-50"
|
|
10
|
-
| #error => "bg-danger-50"
|
|
11
|
-
| #warning => "bg-warning-50"
|
|
12
|
-
| #info => "bg-info-50"
|
|
9
|
+
| #success => "bg-success-50 border-success-500"
|
|
10
|
+
| #error => "bg-danger-50 border-danger-500"
|
|
11
|
+
| #warning => "bg-warning-50 border-warning-500"
|
|
12
|
+
| #info => "bg-info-50 border-info-500"
|
|
13
13
|
},
|
|
14
14
|
className->Option.getWithDefault(""),
|
|
15
15
|
])}>
|
|
16
16
|
{switch status {
|
|
17
|
-
| #success => <BsReactIcons.MdCheckCircle size=28 className="text-success-
|
|
17
|
+
| #success => <BsReactIcons.MdCheckCircle size=28 className="text-success-600 flex-shrink-0" />
|
|
18
18
|
| #error => <BsReactIcons.MdWarning size=28 className="text-danger-600 flex-shrink-0" />
|
|
19
|
-
| #warning => <BsReactIcons.MdWarning size=28 className="text-warning-
|
|
20
|
-
| #info => <BsReactIcons.
|
|
19
|
+
| #warning => <BsReactIcons.MdWarning size=28 className="text-warning-600 flex-shrink-0" />
|
|
20
|
+
| #info => <BsReactIcons.FaExclamationCircle size=28 className="text-info-600 flex-shrink-0" />
|
|
21
21
|
}}
|
|
22
22
|
<div className="mx-3">
|
|
23
|
-
<div
|
|
23
|
+
<div
|
|
24
|
+
className={cx([
|
|
25
|
+
description->Option.isSome ? "font-bold" : "",
|
|
26
|
+
{
|
|
27
|
+
switch status {
|
|
28
|
+
| #success => "text-success-600"
|
|
29
|
+
| #error => "text-danger-600"
|
|
30
|
+
| #warning => "text-warning-600"
|
|
31
|
+
| #info => "text-info-600"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
])}>
|
|
35
|
+
title
|
|
36
|
+
</div>
|
|
24
37
|
{description->Option.getWithDefault(React.null)}
|
|
25
38
|
</div>
|
|
26
39
|
</div>
|
|
@@ -98,14 +98,7 @@ module Core = {
|
|
|
98
98
|
|
|
99
99
|
<React.Fragment key={"tr" ++ index->Int.toString}>
|
|
100
100
|
<Toolkit__Ui_Spread props={row.getRowProps()}>
|
|
101
|
-
<tr
|
|
102
|
-
className={cx([
|
|
103
|
-
"block even:bg-gray-200",
|
|
104
|
-
{
|
|
105
|
-
open Css
|
|
106
|
-
style(list{height(5.5->rem)})
|
|
107
|
-
},
|
|
108
|
-
])}>
|
|
101
|
+
<tr className={"block even:bg-gray-200 min-h-[5.5rem]"}>
|
|
109
102
|
{row.cells
|
|
110
103
|
->Array.mapWithIndex((index, cell) =>
|
|
111
104
|
<Toolkit__Ui_Spread
|
package/src/vendors/Axios.res
CHANGED
|
@@ -98,12 +98,14 @@ external options: (string, ~config: config=?, unit) => Promise.Js.t<response<'da
|
|
|
98
98
|
"options"
|
|
99
99
|
|
|
100
100
|
module Interceptors = {
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
type t
|
|
102
|
+
module Request = {
|
|
103
|
+
@module("axios") @scope(("default", "interceptors", "request"))
|
|
104
|
+
external use: ('config => Promise.Js.t<'updatedConfig, 'error>) => t = "use"
|
|
103
105
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
@module("axios") @scope(("default", "interceptors", "request"))
|
|
107
|
+
external eject: t => unit = "eject"
|
|
108
|
+
}
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
module WithResult = {
|