9cef7173cb
- Full component library (Button, Input, Label, Select, Modal, Table, Badge, Card, etc.) - Tailwind design tokens: IBM Plex Sans + JetBrains Mono, teal accent, semantic status colors - NavBar with logo, responsive hamburger menu, real logout - All pages redesigned: Login, Dashboard (KPI cards), Machines, SyncPairs, JobHistory, JobDetail, SSHKeys, Settings - Fixed: hover:bg-gray-750 dead class, window.location.href navigation bug - Replaced alert()/confirm() with sonner toasts and accessible modals - Added ErrorBoundary, skip link, accessible modal dialogs (Radix) - Icons: lucide-react throughout, copy/download buttons - 1.0.5 → 1.0.6
26 lines
646 B
TypeScript
26 lines
646 B
TypeScript
import * as React from 'react'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
required?: boolean
|
|
}
|
|
|
|
const Label = React.forwardRef<HTMLLabelElement, LabelProps>(
|
|
({ className, required, children, ...props }, ref) => (
|
|
<label
|
|
ref={ref}
|
|
className={cn(
|
|
'text-sm font-medium text-fg-muted leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
{children}
|
|
{required && <span className="ml-1 text-rose-400">*</span>}
|
|
</label>
|
|
)
|
|
)
|
|
Label.displayName = 'Label'
|
|
|
|
export { Label }
|