Create/detail updates

This commit is contained in:
Darren Clarke 2024-04-24 21:44:05 +02:00
parent b0fb643b6a
commit 0997e449bb
26 changed files with 684 additions and 108 deletions

View file

@ -0,0 +1,31 @@
import { FC } from "react";
import { Select as InternalSelect } from "@mui/material";
type SelectProps = {
name: string;
label: string;
formState: Record<string, any>;
children: React.ReactNode;
};
export const Select: FC<SelectProps> = ({
name,
label,
formState,
children,
}) => (
<InternalSelect
fullWidth
name={name}
label={label}
variant="outlined"
size="small"
inputProps={{ id: name }}
defaultValue={formState.values[name] || ""}
sx={{
backgroundColor: "#fff",
}}
>
{children}
</InternalSelect>
);