inital commit, very early alpha stage
This commit is contained in:
23
frontend/src/components/FormRow.tsx
Normal file
23
frontend/src/components/FormRow.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from "react";
|
||||
|
||||
type Props = {
|
||||
label: string;
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export function FormRow({ label, children }: Props) {
|
||||
return (
|
||||
<label className="form-row">
|
||||
<span>{label}</span>
|
||||
{children}
|
||||
</label>
|
||||
);
|
||||
}
|
||||
|
||||
export function TextInput(props: InputHTMLAttributes<HTMLInputElement>) {
|
||||
return <input className="input" {...props} />;
|
||||
}
|
||||
|
||||
export function TextArea(props: TextareaHTMLAttributes<HTMLTextAreaElement>) {
|
||||
return <textarea className="input textarea" {...props} />;
|
||||
}
|
||||
Reference in New Issue
Block a user