o2o-negosium-original/landing/app/components/ui/input.tsx

18 lines
774 B
TypeScript

import * as React from "react"
import { cn } from "@/lib/utils"
// 문의 폼 필드 공통 스타일 — 테두리 없는 회색 채움, 포커스 시 흰 배경 + 파란 링.
const fieldClass =
"w-full px-5 py-3.5 rounded-2xl bg-surface hover:bg-fill focus:bg-white border-0 focus:ring-2 focus:ring-primary/20 text-sm font-semibold text-ink transition-all placeholder:text-ink-faint outline-none"
function Input({ className, ...props }: React.InputHTMLAttributes<HTMLInputElement>) {
return <input className={cn(fieldClass, className)} {...props} />
}
function Textarea({ className, ...props }: React.TextareaHTMLAttributes<HTMLTextAreaElement>) {
return <textarea className={cn(fieldClass, "resize-none", className)} {...props} />
}
export { Input, Textarea }