diff --git a/src/components/ui/Badge/Badge.tsx b/src/components/ui/Badge/Badge.tsx index f47f453..5ac1b42 100644 --- a/src/components/ui/Badge/Badge.tsx +++ b/src/components/ui/Badge/Badge.tsx @@ -9,23 +9,19 @@ import type {BadgeProps} from "./BadgeProps.ts"; * @example * console.log('removed')} /> */ -export function Badge(props: BadgeProps) { - const variant = props.variant ?? 'primary'; - const removable = props.removable ?? false; - // Note: The 'color' prop from BadgeProps is ignored in favor of the 'variant' - // prop, which aligns with DaisyUI's class-based styling. - const badgeClasses = [ - 'badge', - `badge-${variant}`, - 'gap-2' - ].join(' '); +export function Badge(props: Readonly) { + const variant = props.variant ?? 'primary'; + const removable = props.removable ?? false; + // Note: The 'color' prop from BadgeProps is ignored in favor of the 'variant' + // prop, which aligns with DaisyUI's class-based styling. + const badgeClasses = ['badge', `badge-${variant}`, 'gap-2'].join(' '); - return ( -
- {props.text} - {removable && ()} -
- ); + return ( +
+ {props.text} + {removable && ()} +
+ ); } \ No newline at end of file