mirror of
https://github.com/SomboChea/ui
synced 2024-11-05 06:04:28 +07:00
fix: introduced ForwardRef (#177)
* refactor: introduced forwardref - circular progress * refactor: replaced HTMLElementTagNameMap with HTMLElementDiv * fix: fixed func name
This commit is contained in:
parent
d0d4139dd3
commit
af8ed8b3e3
@ -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;
|
||||
|
10
src/muiComponents/CircularProgress/CircularProgress.tsx
Normal file
10
src/muiComponents/CircularProgress/CircularProgress.tsx
Normal 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;
|
1
src/muiComponents/CircularProgress/index.ts
Normal file
1
src/muiComponents/CircularProgress/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export { default } from './CircularProgress';
|
Loading…
Reference in New Issue
Block a user