Prechádzať zdrojové kódy

adjust clickHandler type

mightyplow 4 rokov pred
rodič
commit
716f8ce452
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  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) {