feat(web/dialog): alert dialog

This commit is contained in:
Luke
2022-06-11 11:33:15 +02:00
parent 76fcc007c4
commit 186014f95e
4 changed files with 119 additions and 23 deletions

View File

@@ -23,29 +23,29 @@ interface Props {
rows: Row[];
}
debugData<Props>([
{
action: "openDialog",
data: {
heading: "Police locker",
rows: [
{ type: "input", label: "Locker number" },
{ type: "checkbox", label: "Some checkbox" },
{ type: "input", label: "Locker PIN", password: true, icon: "lock" },
{ type: "checkbox", label: "Some other checkbox" },
{
type: "select",
label: "Locker type",
options: [
{ value: "option1", label: "Option 1" },
{ value: "option2", label: "Option 2" },
{ value: "option3", label: "Option 3" },
],
},
],
},
},
]);
// debugData<Props>([
// {
// action: "openDialog",
// data: {
// heading: "Police locker",
// rows: [
// { type: "input", label: "Locker number" },
// { type: "checkbox", label: "Some checkbox" },
// { type: "input", label: "Locker PIN", password: true, icon: "lock" },
// { type: "checkbox", label: "Some other checkbox" },
// {
// type: "select",
// label: "Locker type",
// options: [
// { value: "option1", label: "Option 1" },
// { value: "option2", label: "Option 2" },
// { value: "option3", label: "Option 3" },
// ],
// },
// ],
// },
// },
// ]);
const InputDialog: React.FC = () => {
const [fields, setFields] = React.useState<Props>({