Add input fields and stuff

This commit is contained in:
kolaflash
2025-12-07 12:41:04 +01:00
parent 16ac19ff5e
commit 11bf084fd8
32 changed files with 578 additions and 29 deletions
+24
View File
@@ -0,0 +1,24 @@
import "./InputField.css";
import type { Component, JSX } from "solid-js";
export const InputField: Component<{
name: string;
value: string;
type?: string;
icon?: JSX.Element;
children?: JSX.Element;
onChange?: (value: string) => void;
onInput?: (value: string) => void;
}> = (props) => (
<label class="input-field" classList={{ icon: !!props.icon }}>
{props.children}
{props.icon}
<input
type={props.type ?? "text"}
name={props.name}
value={props.value}
onChange={(e) => props.onChange?.(e.target.value)}
onInput={(e) => props.onInput?.(e.target.value)}
/>
</label>
);