mirror of
https://github.com/SomboChea/ui
synced 2024-11-24 06:54:27 +07:00
fix: introduced SvgIcon (#184)
This commit is contained in:
parent
3b4d823845
commit
8b86ded434
@ -2,7 +2,8 @@
|
|||||||
/* eslint-disable react/jsx-curly-brace-presence */
|
/* eslint-disable react/jsx-curly-brace-presence */
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import SvgIcon from '@material-ui/core/SvgIcon';
|
|
||||||
|
import SvgIcon from '../muiComponents/SvgIcon';
|
||||||
|
|
||||||
const GitHub: React.FC = props => (
|
const GitHub: React.FC = props => (
|
||||||
<SvgIcon {...props}>
|
<SvgIcon {...props}>
|
||||||
|
10
src/muiComponents/SvgIcon/SvgIcon.tsx
Normal file
10
src/muiComponents/SvgIcon/SvgIcon.tsx
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import React, { forwardRef } from 'react';
|
||||||
|
import { default as MaterialUISvgIcon, SvgIconProps } from '@material-ui/core/SvgIcon';
|
||||||
|
|
||||||
|
type SvgIconRef = SVGSVGElement;
|
||||||
|
|
||||||
|
const SvgIcon = forwardRef<SvgIconRef, SvgIconProps>(function SvgIcon(props, ref) {
|
||||||
|
return <MaterialUISvgIcon {...props} ref={ref} />;
|
||||||
|
});
|
||||||
|
|
||||||
|
export default SvgIcon;
|
1
src/muiComponents/SvgIcon/index.ts
Normal file
1
src/muiComponents/SvgIcon/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export { default } from './SvgIcon';
|
Loading…
Reference in New Issue
Block a user