From 973d897a71b4de9609568f1f080ef7fa34de7a99 Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Wed, 23 Jul 2025 13:24:15 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20=20Badge=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/badge/IVBadge.type.ts | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/components/badge/IVBadge.type.ts 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; +}