From 355802ed6bf20d15f9eeb9e2f4b5832c40a42622 Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Sun, 27 Jul 2025 04:33:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20=20Alert=20component=20?= =?UTF-8?q?interface=20file=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/alert/IVAlert.type.ts | 62 ++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/components/alert/IVAlert.type.ts diff --git a/src/components/alert/IVAlert.type.ts b/src/components/alert/IVAlert.type.ts new file mode 100644 index 0000000..02bbfa5 --- /dev/null +++ b/src/components/alert/IVAlert.type.ts @@ -0,0 +1,62 @@ +/** + * Interface representing the properties of an Alert component. + */ +export default interface IVAlert { + /** + * Determines if the alert should be visible. + * @default false + */ + alert?: boolean; + + /** + * Indicates whether the alert has been closed. + * @default false + */ + closed?: boolean; + + /** + * Specifies if the alert can be closed by the user. + * @default false + */ + closeable?: boolean; + + /** + * Unique identifier for the alert instance. + */ + id?: string; + + /** + * Title displayed at the top of the alert. + */ + title?: string; + + /** + * Detailed description or message content of the alert. + */ + description?: string; + + /** + * Determines if a smaller variant of the alert should be displayed. + * @default false + */ + small?: boolean; + + /** + * Type of alert, affecting its visual style and icon. + * - `"success"`: Indicates a successful or positive action. + * - `"error"`: Indicates an error or critical issue. + * - `"info"`: Provides general information. + * - `"warn"`: Indicates a warning or potential issue. + */ + type?: "success" | "error" | "info" | "warn" | undefined; + + /** + * Label for the close button, useful for accessibility. + */ + closeButtonLabel?: string; + + /** + * Time in milliseconds after which the alert automatically disappears. + */ + lifeTime?: number; +}