mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 05:45:04 +03:00
OmniRoute v3.8.29 — 115 commits since v3.8.28. Full CHANGELOG + 41 i18n mirrors. All content quality gates green (build, unit 8/8, vitest 188/188, PR test policy, quality gates extended, docs sync, quality ratchet). Remaining red CI checks are pre-existing release flakes (coverage-shard/integration/node-compat teardown), a new transitive undici advisory in electron devDeps, and a workflow-level CodeQL fail (0 open alerts). VPS-validated by the operator.
30 lines
1005 B
TypeScript
30 lines
1005 B
TypeScript
"use client";
|
|
|
|
import { cn } from "@/shared/utils/cn";
|
|
|
|
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
error?: boolean;
|
|
}
|
|
|
|
/**
|
|
* Textarea — token-driven multiline input mirroring the Input primitive (same border,
|
|
* focus ring and control radius). Replaces ad-hoc raw `<textarea>` styling at call sites.
|
|
*/
|
|
export default function Textarea({ className, error = false, ...props }: TextareaProps) {
|
|
return (
|
|
<textarea
|
|
className={cn(
|
|
"w-full py-2 px-3 text-sm text-text-main",
|
|
"bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-control",
|
|
"placeholder-text-muted/60",
|
|
"focus:ring-1 focus:ring-accent/30 focus:border-accent/50 focus:outline-none",
|
|
"transition-all disabled:opacity-50 disabled:cursor-not-allowed",
|
|
"text-[16px] sm:text-sm",
|
|
error ? "border-red-500 focus:border-red-500 focus:ring-red-500/20" : "",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|