kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Pass through props like 'strokeWidth' to SvgIcon
rodzic
2ecd6d79dd
commit
3dce8ee95a
|
@ -13,7 +13,7 @@ interface ISvgIcon {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Renders an inline SVG with an empty frame loading state */
|
/** Renders an inline SVG with an empty frame loading state */
|
||||||
const SvgIcon: React.FC<ISvgIcon> = ({ src, alt, size = 24, className }): JSX.Element => {
|
const SvgIcon: React.FC<ISvgIcon> = ({ src, alt, size = 24, className, ...filteredProps }): JSX.Element => {
|
||||||
const loader = (
|
const loader = (
|
||||||
<svg
|
<svg
|
||||||
className={className}
|
className={className}
|
||||||
|
@ -33,6 +33,7 @@ const SvgIcon: React.FC<ISvgIcon> = ({ src, alt, size = 24, className }): JSX.El
|
||||||
height={size}
|
height={size}
|
||||||
loader={loader}
|
loader={loader}
|
||||||
data-testid='svg-icon'
|
data-testid='svg-icon'
|
||||||
|
{...filteredProps}
|
||||||
>
|
>
|
||||||
{/* If the fetch fails, fall back to displaying the loader */}
|
{/* If the fetch fails, fall back to displaying the loader */}
|
||||||
{loader}
|
{loader}
|
||||||
|
|
Ładowanie…
Reference in New Issue