import React from 'react' interface Props { inputType?: string value?: string choices?: { text: string; value: string }[] onChange?: React.ChangeEventHandler placeholder?: string invalid?: boolean validatorMessage?: string } const ModalInput: React.FC = props => ( <> {props.inputType === 'radios' && props.choices ? ( <> {props.choices.map(choice => (
))} ) : (
)} {props.invalid && (
{props.validatorMessage}
)} ) export default ModalInput