Sfoglia il codice sorgente

adjust clickHandler type

mightyplow 4 anni fa
parent
commit
716f8ce452
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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) {