Style !
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import type { JSX } from "preact";
|
||||
|
||||
import { twMerge } from "@/src/tw.ts";
|
||||
|
||||
export const FIELD_CLASS =
|
||||
"w-full rounded-lg border border-gray-300 px-2 py-1 leading-loose dark:border-gray-700 dark:bg-gray-800";
|
||||
|
||||
interface InputFieldProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "class"> {
|
||||
class?: string;
|
||||
}
|
||||
|
||||
export default function InputField({ class: extra, ...props }: InputFieldProps) {
|
||||
return <input class={twMerge(FIELD_CLASS, "h-12", extra)} {...props} />;
|
||||
}
|
||||
Reference in New Issue
Block a user