Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.

Commit af8ed8b

Browse files
priscilawebdevjuanpicado
authored andcommitted
fix: introduced ForwardRef (#177)
* refactor: introduced forwardref - circular progress * refactor: replaced HTMLElementTagNameMap with HTMLElementDiv * fix: fixed func name
1 parent d0d4139 commit af8ed8b

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

src/components/Spinner/styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import CircularProgress from '@material-ui/core/CircularProgress';
21
import styled, { css } from 'react-emotion';
32

43
import colors from '../../utils/styles/colors';
4+
import CircularProgress from '../../muiComponents/CircularProgress';
55

66
interface WrapperProps {
77
centered: boolean;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React, { forwardRef } from 'react';
2+
import { default as MaterialUICircularProgress, CircularProgressProps } from '@material-ui/core/CircularProgress';
3+
4+
type CircularProgressRef = HTMLDivElement;
5+
6+
const CircularProgress = forwardRef<CircularProgressRef, CircularProgressProps>(function CircularProgress(props, ref) {
7+
return <MaterialUICircularProgress {...props} ref={ref} />;
8+
});
9+
10+
export default CircularProgress;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './CircularProgress';

0 commit comments

Comments
 (0)