From 15ba3de211ddc5dd2eb7f8878f97138eb81b900b Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 3 Aug 2020 19:25:21 +0200 Subject: [PATCH] refactor --- src/components/atoms/Input/InputElement.tsx | 29 +++++++++++---------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/components/atoms/Input/InputElement.tsx b/src/components/atoms/Input/InputElement.tsx index 3e2645f21..78a0b4d1d 100644 --- a/src/components/atoms/Input/InputElement.tsx +++ b/src/components/atoms/Input/InputElement.tsx @@ -6,6 +6,19 @@ import FilesInput from '../../molecules/FormFields/FilesInput' import Terms from '../../molecules/FormFields/Terms' import Price from '../../molecules/FormFields/Price' +const DefaultInput = ( + { name, type }: { name: string; type?: string }, + props: InputProps +) => ( + +) + export default function InputElement(props: InputProps): ReactElement { const { type, options, rows, name, prefix, postfix } = props @@ -65,23 +78,11 @@ export default function InputElement(props: InputProps): ReactElement { return prefix || postfix ? (
{prefix &&
{prefix}
} - + {postfix &&
{postfix}
}
) : ( - + ) } }