Nychthemeron/packages/library/src/components/ui/badge/index.ts
Matthew L McPeak 9bb6bcad9f
All checks were successful
ci / build (push) Successful in 31s
ci / publish (push) Successful in 12s
ci / publish-docs (push) Successful in 1m9s
Tweaked styling
2026-07-16 08:37:23 -04:00

24 lines
887 B
TypeScript

import type { VariantProps } from 'class-variance-authority'
import { cva } from 'class-variance-authority'
export { default as Badge } from './Badge.vue'
export const badgeVariants = cva(
'inline-flex w-fit shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 text-xs font-serif font-semibold [&>svg]:size-3',
{
variants: {
variant: {
primary: 'bg-primary text-primary-foreground',
secondary: 'bg-secondary text-secondary-foreground',
info: 'bg-info text-info-foreground',
success: 'bg-success text-success-foreground',
warning: 'bg-warning text-warning-foreground',
danger: 'bg-destructive text-destructive-foreground',
},
},
defaultVariants: {
variant: 'primary',
},
},
)
export type BadgeVariants = VariantProps<typeof badgeVariants>