clean all
This commit is contained in:
1 parent
f57d6ec3d3
commit
27afb719f5
101 files changed
+45
-14426
No files matched your search
@@ -1,33 +0,0 @@
|
||||
import type { HTMLAttributes, ReactNode } from 'react';
|
||||
|
||||
import { cn } from '@/lib/cn';
|
||||
|
||||
type Variant = 'neutral' | 'mild' | 'moderate' | 'severe' | 'soft';
|
||||
|
||||
const variants: Record<Variant, string> = {
|
||||
neutral: 'bg-clinic-100 text-clinic-800',
|
||||
mild: 'bg-clinic-200 text-clinic-800',
|
||||
moderate: 'bg-warm-300 text-clinic-900',
|
||||
severe: 'bg-warm-500 text-white',
|
||||
soft: 'bg-clinic-50 text-clinic-700 border border-clinic-100',
|
||||
};
|
||||
|
||||
export function Badge({
|
||||
variant = 'neutral',
|
||||
className,
|
||||
children,
|
||||
...rest
|
||||
}: HTMLAttributes<HTMLSpanElement> & { variant?: Variant; children?: ReactNode }) {
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium',
|
||||
variants[variant],
|
||||
className,
|
||||
)}
|
||||
{...rest}
|
||||
>
|
||||
{children}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user