Przeglądaj źródła

adjust clickHandler type

mightyplow 4 lat temu
rodzic
commit
716f8ce452
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/components/button/IconButton.tsx

+ 2 - 2
src/components/button/IconButton.tsx

@@ -1,5 +1,5 @@
 import cx from 'classnames';
-import React, { ReactChild } from 'react';
+import React, { SyntheticEvent } from 'react';
 import { Icon } from '../icon/Icon';
 import styles from './button.css';
 
@@ -7,7 +7,7 @@ type IconButtonProps = {
   icon: string,
   buttonClassName?: string,
   iconClassName?: string,
-  onClick?: () => void
+  onClick?: (event: SyntheticEvent) => void
 };
 
 function IconButton ({icon, buttonClassName, iconClassName, onClick}: IconButtonProps) {