diff --git a/components/Button.tsx b/components/Button.tsx index 2520186..e8f2bf1 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -1,42 +1,28 @@ interface ButtonProps { text?: string, icon?: string, - onClick?: () => void, loading?: boolean, - type?: ButtonType, -} - -export enum ButtonType { - submit = 'submit', - button = 'button', -} - -Button.defaultProps = { - loading: false, - type: ButtonType.button, + onClick: () => void, } function Button(props: ButtonProps): JSX.Element { + + function handleTouchEnd(event: React.TouchEvent) { + event.preventDefault(); + event.stopPropagation(); + + props.onClick(); + } + return ( ) diff --git a/components/Form.tsx b/components/Form.tsx index 7cb9937..0261e64 100644 --- a/components/Form.tsx +++ b/components/Form.tsx @@ -13,7 +13,7 @@ import {getPayloadBodyFromFile, getPayloadBodyFromQR} from "../src/process"; import {PassData} from "../src/pass"; import {COLORS} from "../src/colors"; import Colors from './Colors'; -import Button, { ButtonType } from './Button'; +import Button from './Button'; function Form(): JSX.Element { const {t} = useTranslation(['index', 'errors', 'common']); @@ -278,7 +278,19 @@ function Form(): JSX.Element {

-
}/>