1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-17 00:25:50 +07:00

fix: introduced forwardRef (#164)

This commit is contained in:
Priscila Oliveira
2019-10-06 17:17:36 +02:00
committed by Juan Picado @jotadeveloper
parent 9eb698f7e1
commit 909a8d9fb8
7 changed files with 19 additions and 6 deletions

View File

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

View File

@@ -0,0 +1 @@
export { default } from './Button';