feat: add className prop

This commit is contained in:
ValdiANS
2026-01-24 11:19:33 +07:00
parent 335b254a60
commit ab390ab461
+14 -2
View File
@@ -5,9 +5,17 @@ import { Color } from '@/types/theme';
interface StatusBadgeProps {
color: Color;
text: string;
className?: {
badge?: string;
status?: string;
};
}
const StatusBadge = ({ color = 'neutral', text }: StatusBadgeProps) => {
const StatusBadge = ({
color = 'neutral',
text,
className,
}: StatusBadgeProps) => {
return (
<Badge
variant='soft'
@@ -18,8 +26,11 @@ const StatusBadge = ({ color = 'neutral', text }: StatusBadgeProps) => {
'bg-base-content/5': color === 'neutral',
'bg-success/30': color === 'success',
'bg-error/20': color === 'error',
}
'bg-primary/20': color === 'info',
},
className?.badge
),
status: cn(className?.status),
}}
color={color}
>
@@ -31,6 +42,7 @@ const StatusBadge = ({ color = 'neutral', text }: StatusBadgeProps) => {
'text-base-content/10': color === 'neutral',
'text-success': color === 'success',
'text-error': color === 'error',
'text-primary': color === 'info',
})}
>
<circle r='6' cx='6' cy='6' fill='currentColor' />