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