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

Commit

Permalink
fix: introduced SvgIcon (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
priscilawebdev authored and juanpicado committed Oct 12, 2019
1 parent 3b4d823 commit 8b86ded
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/icons/GitHub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
/* eslint-disable react/jsx-curly-brace-presence */

import React from 'react';
import SvgIcon from '@material-ui/core/SvgIcon';

import SvgIcon from '../muiComponents/SvgIcon';

const GitHub: React.FC = props => (
<SvgIcon {...props}>
Expand Down
10 changes: 10 additions & 0 deletions src/muiComponents/SvgIcon/SvgIcon.tsx
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions src/muiComponents/SvgIcon/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './SvgIcon';

0 comments on commit 8b86ded

Please sign in to comment.