Files
kit-ui/components/ui/Badge.tsx
Sebastian Krüger 2000623c67 feat: implement Figlet, Pastel, and Unit tools with a unified layout
- Add Figlet text converter with font selection and history
- Add Pastel color palette generator and manipulation suite
- Add comprehensive Units converter with category-based logic
- Introduce AppShell with Sidebar and Header for navigation
- Modernize theme system with CSS variables and new animations
- Update project configuration and dependencies
2026-02-22 21:35:53 +01:00

36 lines
1.1 KiB
TypeScript

'use client';
import * as React from 'react';
import { cn } from '@/lib/utils/cn';
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
variant?: 'default' | 'success' | 'warning' | 'destructive' | 'outline';
}
const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(
({ className, variant = 'default', ...props }, ref) => {
return (
<div
ref={ref}
className={cn(
'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors',
'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
{
'bg-primary text-primary-foreground': variant === 'default',
'bg-green-500 text-white': variant === 'success',
'bg-yellow-500 text-white': variant === 'warning',
'bg-destructive text-destructive-foreground': variant === 'destructive',
'border border-input': variant === 'outline',
},
className
)}
{...props}
/>
);
}
);
Badge.displayName = 'Badge';
export { Badge };