...
Code Block | ||
---|---|---|
| ||
import { InputSelectionHandler} from 'empower-inputs';
let [formElement, setFormElement] = useState({
sampleToggleButton: {
id: 'sampleToggleButton',
type: 'toggle-button',
placeholder: 'Please select option',
value: '',
disabled: false,
required: true,
options: [
{
label: "Approve",
value: "APPROVED",
},
{
label: "Reject",
value: "REJECTED",
}
]
}
});
..............
return (
<>
<h4>TOGGLE BUTTON</h4>
<InputSelectionHandler
config={formElement.sampleToggleButton}
customClass="toggle-button-custom-class"
onChanged={(e: any) => inputChangedHandler(e, 'sampleToggleButton')}
/>
</>
) |
...