mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
21 lines
580 B
TypeScript
21 lines
580 B
TypeScript
import React from "react";
|
|
import { Label } from "./Typography";
|
|
|
|
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>{label}</Label>}
|
|
|
|
<input
|
|
className="h-10 rounded-md bg-brand-secondary p-3 text-white outline-none outline-offset-0 transition-all duration-150 ease-in-out focus:outline-brand-primary"
|
|
{...rest}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|