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

Commit 8b86ded

Browse files
priscilawebdevjuanpicado
authored andcommitted
fix: introduced SvgIcon (#184)
1 parent 3b4d823 commit 8b86ded

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/icons/GitHub.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
/* eslint-disable react/jsx-curly-brace-presence */
33

44
import React from 'react';
5-
import SvgIcon from '@material-ui/core/SvgIcon';
5+
6+
import SvgIcon from '../muiComponents/SvgIcon';
67

78
const GitHub: React.FC = props => (
89
<SvgIcon {...props}>
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 MaterialUISvgIcon, SvgIconProps } from '@material-ui/core/SvgIcon';
3+
4+
type SvgIconRef = SVGSVGElement;
5+
6+
const SvgIcon = forwardRef<SvgIconRef, SvgIconProps>(function SvgIcon(props, ref) {
7+
return <MaterialUISvgIcon {...props} ref={ref} />;
8+
});
9+
10+
export default SvgIcon;

src/muiComponents/SvgIcon/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './SvgIcon';

0 commit comments

Comments
 (0)