@yuno-payments/dashboard-design-system 0.0.165 → 0.0.166
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Alert as ShadcnAlert } from '../../../vendor/shadcn/alert';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
-
import { IconName } from '../icon';
|
|
3
|
+
import { Icon, IconName } from '../icon';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the Alert component
|
|
6
6
|
*/
|
|
@@ -17,6 +17,10 @@ interface AlertProps extends Omit<ComponentProps<typeof ShadcnAlert>, "children"
|
|
|
17
17
|
* Alert description/body text
|
|
18
18
|
*/
|
|
19
19
|
description?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Props for the icon component
|
|
22
|
+
*/
|
|
23
|
+
iconProps?: ComponentProps<typeof Icon>;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
26
|
* Alert component for displaying informational, success, warning, or error messages.
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { Alert as
|
|
2
|
+
import { Alert as a, AlertTitle as i, AlertDescription as f } from "../../../vendor/shadcn/alert.js";
|
|
3
3
|
import { forwardRef as n } from "react";
|
|
4
4
|
import { Icon as p } from "../icon/icon.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { cn as x } from "../../../lib/utils.js";
|
|
6
|
+
const c = n(
|
|
7
|
+
({ icon: e, title: m, description: s, iconProps: t, ...l }, o) => /* @__PURE__ */ r.jsxs(a, { ref: o, ...l, children: [
|
|
8
|
+
e && /* @__PURE__ */ r.jsx(p, { name: e, className: x("size-4", t?.className), ...t }),
|
|
9
|
+
m && /* @__PURE__ */ r.jsx(i, { children: m }),
|
|
10
|
+
s && /* @__PURE__ */ r.jsx(f, { children: s })
|
|
10
11
|
] })
|
|
11
12
|
);
|
|
12
|
-
|
|
13
|
+
c.displayName = "Alert";
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
+
c as Alert
|
|
15
16
|
};
|