diff --git a/src/components/badge/IVBadge.type.ts b/src/components/badge/IVBadge.type.ts new file mode 100644 index 0000000..e649505 --- /dev/null +++ b/src/components/badge/IVBadge.type.ts @@ -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; +}