Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; import { ui } from "@/config/theme"; import { cn } from "@/lib/utils"; const badgeVariants = cva(ui("badge"), { variants: { variant: { default: ui("badgeDefault"), brand: ui("badgeBrand"), secondary: ui("badgeSecondary"), destructive: ui("badgeDestructive"), outline: ui("badgeOutline"), }, }, defaultVariants: { variant: "default", }, }); export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {} function Badge({ className, variant, ...props }: BadgeProps) { return <div className={cn(badgeVariants({ variant }), className)} {...props} />; } export { Badge, badgeVariants }; |