diff --git a/src/app/atoms/Button.tsx b/src/app/atoms/Button.tsx index 76007efd9..b06d02749 100644 --- a/src/app/atoms/Button.tsx +++ b/src/app/atoms/Button.tsx @@ -1,23 +1,34 @@ import * as React from "react"; -import { AnalyticsEventCategory, TestIDProps, useAnalytics } from "lib/analytics"; +import { + AnalyticsEventCategory, + TestIDProps, + useAnalytics, +} from "lib/analytics"; -interface Props extends React.DetailedHTMLProps, HTMLButtonElement>, TestIDProps { -} +interface Props + extends React.DetailedHTMLProps< + React.ButtonHTMLAttributes, + HTMLButtonElement + >, + TestIDProps {} -export const Button = React.forwardRef(({ - testID, - testIDProperties, - onClick, - ...props - }, ref) => { +export const Button = React.forwardRef( + ({ testID, testIDProperties, onClick, ...props }, ref) => { const { trackEvent } = useAnalytics(); - const handleClick = (e: React.MouseEvent) => { - testID !== undefined && trackEvent(testID, AnalyticsEventCategory.ButtonPress, testIDProperties); + const handleClick = ( + e: React.MouseEvent + ) => { + testID !== undefined && + trackEvent( + testID, + AnalyticsEventCategory.ButtonPress, + testIDProperties + ); - onClick !== undefined && onClick(e); - } - return