@colisweb/rescript-toolkit 2.31.1 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "2.31.1",
3
+ "version": "2.32.0",
4
4
  "scripts": {
5
5
  "clean": "rescript clean",
6
6
  "build": "rescript build",
@@ -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-500 flex-shrink-0" />
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-500 flex-shrink-0" />
20
- | #info => <BsReactIcons.MdInfoOutline size=28 className="text-info-500 flex-shrink-0" />
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 className={description->Option.isSome ? "font-bold" : ""}> title </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>