24 lines
887 B
TypeScript
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>
|