From ab390ab461031043775a1af686657d3d65d200c9 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Sat, 24 Jan 2026 11:19:33 +0700 Subject: [PATCH] feat: add className prop --- src/components/helper/StatusBadge.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/helper/StatusBadge.tsx b/src/components/helper/StatusBadge.tsx index fa15812e..46b36559 100644 --- a/src/components/helper/StatusBadge.tsx +++ b/src/components/helper/StatusBadge.tsx @@ -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 ( { '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', })} >