import React, { useState } from "react"; import PropTypes from "prop-types"; import FormFieldList from "../FormFieldList"; import OptionPreamble from "../OptionPreamble"; const PatternOptionList = props => { const [value, setValue] = useState(props.dflt); const update = (name, newValue, evt) => { props.updateValue(props.name, newValue); setValue(newValue); }; const reset = () => { setValue(props.dflt); props.updateValue(props.name, props.dflt); }; const styles = { container: { display: "flex", flexDirection: "row", alignItems: "center" }, left: { flexGrow: 1, margin: "0 0.5rem" }, right: { margin: "0 0.5rem" } }; return (