RadioGroup
Used to confirm terms and check boolean types.
chocolate
cherry
apple
Props:
options
Array of options. Type: {value: string, label: string}[]. Required.
onChange
Function invoked at chaning. Type: Function. Required.
style
Description: Input style. Type: CSS Properties.
className
Description: ClassName. Type: String.
labelStyle
Description: Label style. Type: CSS Properties.
labelClassName
Description: ClassName. Type: String.
Code
const options = [ { value: 'chocolate', label: 'chocolate' }, { value: 'cherry', label: 'cherry' }, { value: 'apple', label: 'apple' }, ] <RadioGroup options={options} onChange={(e) => setSelectedOption(e.target.value)} />