From 10bcaa5ba8a4477ff83d8e2af5509c95ee0762a9 Mon Sep 17 00:00:00 2001 From: JohnDoe6345789 Date: Thu, 25 Dec 2025 19:55:14 +0000 Subject: [PATCH] code: tsx,nextjs,frontends (1 files) --- frontends/nextjs/src/components/ui/atoms/Badge.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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} /> ) }