Forms: accept additional props

This commit is contained in:
Alex Gleason 2022-04-28 17:27:12 -05:00
parent ce23e48106
commit 756506cbb6
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 8 additions and 1 deletions

View File

@ -78,6 +78,7 @@ interface ISimpleInput {
label?: React.ReactNode,
hint?: React.ReactNode,
error?: boolean,
onChange?: React.ChangeEventHandler,
}
export const SimpleInput: React.FC<ISimpleInput> = (props) => {
@ -111,6 +112,7 @@ interface ISimpleForm {
className?: string,
onSubmit?: React.FormEventHandler,
acceptCharset?: string,
style?: React.CSSProperties,
}
export const SimpleForm: React.FC<ISimpleForm> = (props) => {
@ -217,7 +219,12 @@ export const SelectDropdown: React.FC<ISelectDropdown> = (props) => {
) : selectElem;
};
export const TextInput: React.FC = props => (
interface ITextInput {
onChange?: React.ChangeEventHandler,
placeholder?: string,
}
export const TextInput: React.FC<ITextInput> = props => (
<SimpleInput type='text' {...props} />
);