🏷️ Badge component interface file added

This commit is contained in:
Paul Valerie GOMA 2025-07-23 13:24:15 +02:00
parent 5534c2ae45
commit 973d897a71

View File

@ -0,0 +1,38 @@
/**
* Interface representing the properties of a Badge component.
*/
export default interface IBadge {
/**
* The text label displayed inside the badge.
*/
label: string;
/**
* The type of badge, which determines its color and icon.
* - `success`: Indicates a positive or successful status.
* - `error`: Indicates an error or negative status.
* - `new`: Highlights something new or recently added.
* - `info`: Provides informational context.
* - `warning`: Warns the user about a potential issue.
* - **undefined**: Defaults to a neutral badge style.
*/
type?: 'success' | 'error' | 'new' | 'info' | 'warning' | undefined;
/**
* If true, the badge will be displayed without an icon.
* Defaults to false.
*/
noIcon?: boolean;
/**
* If true, the badge will be rendered in a smaller size.
* Useful for compact UI elements.
*/
small?: boolean;
/**
* Optional maximum width for the badge.
* Accepts any valid CSS width value (e.g., '100px', '10rem', '50%').
*/
maxWidth?: string;
}