import { forwardRef, type HTMLAttributes } from 'react'
import { cn } from '../../lib/utils'
export type BadgeVariant = 'success' | 'warning' | 'danger' | 'neutral' | 'info'
export type BadgeProps = HTMLAttributes & {
variant?: BadgeVariant
}
const variants: Record = {
success: 'bg-success-soft text-success',
warning: 'bg-warning-soft text-warning',
danger: 'bg-danger-soft text-danger',
neutral: 'bg-primary-soft text-primary',
/* Informational state, not an alert: waitlist, free spots. Uses the legible
accent ink (`accent-fg` is the light blue in the dark theme, 7.1:1 on the
card) and not the plain `accent`, which in dark scores 2.2:1 and misses the
3:1 minimum for non-text content. */
info: 'bg-accent-soft text-accent-fg',
}
export const Badge = forwardRef(
({ className, variant = 'neutral', ...props }, ref) => {
return (
)
},
)
Badge.displayName = 'Badge'