forked from sombochea/verdaccio-ui
fix: introduced forwardRef (#163)
This commit is contained in:
committed by
Juan Picado @jotadeveloper
parent
909a8d9fb8
commit
626bcce5cb
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user