🏷️ Alert component interface file added
This commit is contained in:
parent
880e3d0f15
commit
355802ed6b
62
src/components/alert/IVAlert.type.ts
Normal file
62
src/components/alert/IVAlert.type.ts
Normal file
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user