@colisweb/rescript-toolkit 2.59.1 → 2.60.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,7 +4,7 @@ type status = [#success | #error | #warning | #info]
|
|
|
4
4
|
let make = (~title, ~description=?, ~status, ~className=?) =>
|
|
5
5
|
<div
|
|
6
6
|
className={cx([
|
|
7
|
-
"
|
|
7
|
+
"p-4 flex items-center border rounded-lg",
|
|
8
8
|
switch status {
|
|
9
9
|
| #success => "bg-success-50 border-success-500"
|
|
10
10
|
| #error => "bg-danger-50 border-danger-500"
|
|
@@ -16,18 +16,19 @@ let make = (~title, ~description=?, ~status, ~className=?) =>
|
|
|
16
16
|
{switch status {
|
|
17
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 =>
|
|
19
|
+
| #warning =>
|
|
20
|
+
<BsReactIcons.FaExclamationTriangle size=28 className="text-warning-600 flex-shrink-0" />
|
|
20
21
|
| #info => <BsReactIcons.FaExclamationCircle size=28 className="text-info-600 flex-shrink-0" />
|
|
21
22
|
}}
|
|
22
23
|
<div className="mx-3">
|
|
23
24
|
<div
|
|
24
25
|
className={cx([
|
|
25
|
-
description->Option.isSome ? "font-
|
|
26
|
+
description->Option.isSome ? "font-semibold" : "",
|
|
26
27
|
{
|
|
27
28
|
switch status {
|
|
28
29
|
| #success => "text-success-600"
|
|
29
30
|
| #error => "text-danger-600"
|
|
30
|
-
| #warning => "text-warning-
|
|
31
|
+
| #warning => "text-warning-700"
|
|
31
32
|
| #info => "text-info-600"
|
|
32
33
|
}
|
|
33
34
|
},
|
|
@@ -5980,3 +5980,8 @@ module FaCog = {
|
|
|
5980
5980
|
@module("react-icons/fa") @react.component
|
|
5981
5981
|
external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element = "FaCog"
|
|
5982
5982
|
}
|
|
5983
|
+
module FaExclamationTriangle = {
|
|
5984
|
+
@module("react-icons/fa") @react.component
|
|
5985
|
+
external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
|
|
5986
|
+
"FaExclamationTriangle"
|
|
5987
|
+
}
|
|
@@ -348,8 +348,17 @@ module FormattedTimeParts = {
|
|
|
348
348
|
|
|
349
349
|
module FormattedTimeWithSeparator = {
|
|
350
350
|
@react.component
|
|
351
|
-
let make = (
|
|
352
|
-
|
|
351
|
+
let make = (
|
|
352
|
+
~value: Js.Date.t,
|
|
353
|
+
~separator=?,
|
|
354
|
+
~month=?,
|
|
355
|
+
~hour=?,
|
|
356
|
+
~minute=?,
|
|
357
|
+
~second=?,
|
|
358
|
+
~timeZone=?,
|
|
359
|
+
~hour12=?,
|
|
360
|
+
) => {
|
|
361
|
+
<FormattedTimeParts value ?month ?hour ?minute ?second ?timeZone ?hour12>
|
|
353
362
|
{(~formattedTimeParts) => {
|
|
354
363
|
let (hours, sep, minutes) = formattedTimeParts->Obj.magic
|
|
355
364
|
|