- Add comprehensive design token system (colors, typography, spacing) - Create 12 new UI components with Radix UI primitives - Add layout components (PageShell, StatsCard, EmptyState, DataTable) - Polish all pages with new component library - Improve accessibility with WCAG 2.1 compliance - Add dark mode support with semantic color tokens - Update 947 tests to match new UI patterns Closes #409
35 lines
1005 B
TypeScript
35 lines
1005 B
TypeScript
import * as React from 'react'
|
|
import { cn } from '../../utils/cn'
|
|
|
|
export interface TextareaProps
|
|
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
error?: boolean
|
|
}
|
|
|
|
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
({ className, error, ...props }, ref) => {
|
|
return (
|
|
<textarea
|
|
className={cn(
|
|
'flex min-h-[80px] w-full rounded-lg px-3 py-2',
|
|
'border bg-surface-base text-content-primary',
|
|
'text-sm placeholder:text-content-muted',
|
|
'transition-colors duration-fast',
|
|
error
|
|
? 'border-error focus:ring-error/20'
|
|
: 'border-border hover:border-border-strong focus:border-brand-500',
|
|
'focus:outline-none focus:ring-2 focus:ring-brand-500/20',
|
|
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
'resize-y',
|
|
className
|
|
)}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
)
|
|
Textarea.displayName = 'Textarea'
|
|
|
|
export { Textarea }
|