diff --git a/frontends/nextjs/src/components/ui/atoms/Badge.tsx b/frontends/nextjs/src/components/ui/atoms/Badge.tsx index 28a213bb8..2cd4cd241 100644 --- a/frontends/nextjs/src/components/ui/atoms/Badge.tsx +++ b/frontends/nextjs/src/components/ui/atoms/Badge.tsx @@ -1,13 +1,15 @@ 'use client' import { forwardRef, ReactNode } from 'react' -import { Chip, ChipProps } from '@mui/material' +import { Chip, ChipProps, SxProps, Theme } from '@mui/material' export type BadgeVariant = 'default' | 'secondary' | 'destructive' | 'outline' -export interface BadgeProps extends Omit { +export interface BadgeProps { variant?: BadgeVariant children?: ReactNode + className?: string + sx?: SxProps } const variantMap: Record = { @@ -18,7 +20,7 @@ const variantMap: Record( - ({ variant = 'default', children, sx, ...props }, ref) => { + ({ variant = 'default', children, className, sx, ...props }, ref) => { const config = variantMap[variant] return ( @@ -28,6 +30,7 @@ const Badge = forwardRef( variant={config.variant} color={config.color} size="small" + className={className} sx={{ height: 'auto', py: 0.25, @@ -38,7 +41,6 @@ const Badge = forwardRef( ...config.sx, ...sx, }} - {...props} /> ) }