- Added HeaderLayout component for the application header. - Introduced KeepAliveViewport for managing tab states and rendering. - Created TabNav for tab navigation with animated indicator. - Removed old Tabs component in favor of new layout structure. - Updated routing with AppRouter and defined appTabs for navigation. - Enhanced theme context to manage dark mode styles. - Added new UI components: Badge, Button, Separator, and Tabs. - Refactored pages to utilize new layout components and improve responsiveness. - Updated global styles for better theming and layout consistency. - Introduced TypeScript path aliases for cleaner imports.
31 lines
839 B
TypeScript
31 lines
839 B
TypeScript
import { cva, type VariantProps } from 'class-variance-authority';
|
|
import type * as React from 'react';
|
|
|
|
import { cn } from '@/lib/utils';
|
|
|
|
const badgeVariants = cva(
|
|
'inline-flex items-center rounded-md border px-2 py-1 text-[11px] font-medium tracking-[0.22em] uppercase transition-colors',
|
|
{
|
|
variants: {
|
|
variant: {
|
|
default: 'border-primary/30 bg-primary/10 text-primary',
|
|
secondary: 'border-border bg-muted text-muted-foreground',
|
|
outline: 'border-border bg-transparent text-foreground',
|
|
},
|
|
},
|
|
defaultVariants: {
|
|
variant: 'default',
|
|
},
|
|
},
|
|
);
|
|
|
|
function Badge({
|
|
className,
|
|
variant,
|
|
...props
|
|
}: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants>) {
|
|
return <span className={cn(badgeVariants({ variant }), className)} {...props} />;
|
|
}
|
|
|
|
export { Badge };
|