Repository URL to install this package:
Version:
0.9.5 ▾
|
const toRadioInput = (input, index) => {
// I think this was converting it back to props...
if (input.isInputState === true) {
return input
}
const radioInputProps = {
// every input in a radiogroup has the same name, that's the specification
name: input.label || input.name,
identifier: 'radio_' + index,
// api data
isSelected: input.isSelected
? input.isSelected
: input.selected
? input.selected
: false,
label: input.label || input.name,
// customizations
// @todo className
classes: 'radio-label',
type: 'radio',
image: input.image || '',
}
return radioInputProps
}
export { toRadioInput }
export default toRadioInput