import { FormControl, InputLabel, MenuItem, Select } from "@mui/material"; import { PropEdit } from "./PropEdit"; export interface SelectOption { value: string; label: string; } export function PropSelect(p: { value?: string; editing: boolean; label: string; options: SelectOption[]; onValueChange: (o?: string) => void; }): React.ReactElement { if (!p.editing && !p.value) return <>; if (!p.editing) { const value = p.options.find((o) => o.value === p.value)?.label; return ; } return ( {p.label} ); }