fix: introduced forwardRef (#163)

This commit is contained in:
Priscila Oliveira
2019-10-06 18:30:05 +02:00
committed by Juan Picado @jotadeveloper
parent 909a8d9fb8
commit 626bcce5cb
13 changed files with 105 additions and 71 deletions

View File

@@ -1,12 +1,12 @@
import React, { forwardRef } from 'react';
import { default as MuiIconButton, IconButtonProps } from '@material-ui/core/IconButton';
import { default as MaterialUIIconButton, IconButtonProps } from '@material-ui/core/IconButton';
type IconButtonRef = HTMLElementTagNameMap['button'];
/* eslint-disable verdaccio/jsx-spread */
// eslint-disable-next-line react/display-name
const IconButton = forwardRef<IconButtonRef, IconButtonProps>(function IconButton(props, ref) {
return <MuiIconButton {...props} ref={ref} />;
return <MaterialUIIconButton {...props} ref={ref} />;
});
export default IconButton;