🔹 Description
A component that lets the user choose one value from the two options.
🔹System Dependencies
🔹 Installation
The package can be installed via npm:
npm install empower-inputs --save
🔹 Standard Checkbox
Configuration
import { InputSelectionHandler} from 'empower-inputs'; let [formElement, setFormElement] = useState({ sampleRadio: { id: 'sampleRadio', type: 'radio', label: "Sample Radio", value: '', readOnly: false, disabled: false, required: true, options: [ { label: "Part-Time", value: "part-time", disabled: false, }, { label: "Full-Time", value: "full-time", disabled: false, } ] }, }); .............. return ( <> <InputSelectionHandler config={formElement.sampleRadio} onChanged={(e) => inputChangedHandler(e, 'sampleRadio')} /> </> )
🔹 Properties
Parent Parameter | Sub Parameter | Data Type | Constraint |
---|---|---|---|
config | JSON Object | Required | |
id | String | Required | |
type | String | Required | |
label | String | Optional | |
value | Array Object | Required | |
placeholder | String | Optional | |
readOnly | Boolean | Optional | |
disabled | Boolean | Optional | |
required | Boolean | Optional | |
options | Array <object> | Required | |
customClass | String | Optional | |
onChanged | Event Method | Required |
🔹 References
Repository Link: https://bitbucket.org/empowerteams/empower-inputs
NPM Package: npm: empower-inputs
Demo Repo: git@bitbucket.org:empowerteams/mfe-sub-application-template.git