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; +}