mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
22 lines
608 B
TypeScript
22 lines
608 B
TypeScript
import React from "react";
|
|
|
|
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
label?: string;
|
|
className?: string;
|
|
}
|
|
|
|
export function Input({ label, className, ...rest }: InputProps) {
|
|
return (
|
|
<div className={"flex flex-col " + className}>
|
|
{label && (
|
|
<label className="text-md mb-2 font-medium text-white">{label}</label>
|
|
)}
|
|
|
|
<input
|
|
className="h-10 rounded-md bg-brand-secondary p-3 text-white transition-all duration-150 ease-in-out outline-none outline-offset-0 focus:outline-brand-primary"
|
|
{...rest}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|