Use custom SvgIcon component wrapper around InlineSVG

This commit is contained in:
Alex Gleason
2022-04-07 13:47:06 -05:00
parent 17ee19aca7
commit 423c005437
11 changed files with 58 additions and 36 deletions

View File

@ -1,7 +1,7 @@
import classNames from 'classnames';
import React from 'react';
import InlineSVG from 'react-inlinesvg';
import SvgIcon from '../icon/svg-icon';
import Text from '../text/text';
interface IIconButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
@ -24,7 +24,7 @@ const IconButton = React.forwardRef((props: IIconButton, ref: React.ForwardedRef
{...filteredProps}
data-testid='icon-button'
>
<InlineSVG src={src} className={iconClassName} />
<SvgIcon src={src} className={iconClassName} />
{text ? (
<Text tag='span' theme='muted' size='sm'>