fix: introduced ForwardRef (#177)

* refactor: introduced forwardref - circular progress

* refactor: replaced HTMLElementTagNameMap with HTMLElementDiv

* fix: fixed func name
This commit is contained in:
Priscila Oliveira 2019-10-12 09:54:52 +02:00 committed by Juan Picado @jotadeveloper
parent d0d4139dd3
commit af8ed8b3e3
3 changed files with 12 additions and 1 deletions

View File

@ -1,7 +1,7 @@
import CircularProgress from '@material-ui/core/CircularProgress';
import styled, { css } from 'react-emotion';
import colors from '../../utils/styles/colors';
import CircularProgress from '../../muiComponents/CircularProgress';
interface WrapperProps {
centered: boolean;

View File

@ -0,0 +1,10 @@
import React, { forwardRef } from 'react';
import { default as MaterialUICircularProgress, CircularProgressProps } from '@material-ui/core/CircularProgress';
type CircularProgressRef = HTMLDivElement;
const CircularProgress = forwardRef<CircularProgressRef, CircularProgressProps>(function CircularProgress(props, ref) {
return <MaterialUICircularProgress {...props} ref={ref} />;
});
export default CircularProgress;

View File

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