Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
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: [
          sampleToggle: {
            labelid: "ApprovesampleToggle",
            valuelabel: "APPROVEDSample Toggle",
          }type: 'toggle',
          {
            label: "Reject"value: false,
            valuerequired: "REJECTED"true,
          }
      disabled: false
 ]     }
,    
});

..............

return (
    <>
      <h4>TOGGLE BUTTON</h4><InputSelectionHandler
      <InputSelectionHandler         config={formElement.sampleToggleButtonsampleToggle}
        customClass="toggle-button-custom-class"         onChanged={(e) => inputChangedHandler(e, 'sampleToggleButtonsampleToggle')}
      />
    </>
  )

🔹  Properties

...