import { createSignal, onMount } from "solid-js";
import {
Button, Checkbox, Datepicker, ExtendedFab, Fab, IconButton, Radio, Radios,
Search, Select, SelectOption, Slider, Switch, TextField, Timepicker,
} from "../../dist/solid/index.js";
type Association = { id: string; name?: string; form?: string };
const fields = {
button: (props: Association) => ,
checkbox: (props: Association) => ,
datepicker: (props: Association) => ,
"extended-fab": (props: Association) => ,
fab: (props: Association) => ,
"icon-button": (props: Association) => ,
radios: (props: Association) => (
AlphaBeta
),
search: (props: Association) => ,
select: (props: Association) => (
),
slider: (props: Association) => ,
switch: (props: Association) => ,
"text-field": (props: Association) => ,
timepicker: (props: Association) => ,
};
export const SolidForms = () => {
const [stage, setStage] = createSignal(0);
onMount(() => { window.setFormStage = setStage; });
const controls = (placement: "inside" | "outside") => Object.entries(fields).map(([kind, Control]) => {
const id = `${placement}-${kind}`;
return ;
});
return {controls("outside")};
};
declare global {
interface Window {
setFormStage: (stage: number) => void;
}
}