mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-23 14:55:44 +00:00
feat: add className prop
This commit is contained in:
@@ -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' />
|
||||
|
||||
Reference in New Issue
Block a user