first commit
This commit is contained in:
30
src/components/SvgImage/SvgImage.tsx
Normal file
30
src/components/SvgImage/SvgImage.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import React from "react";
|
||||
|
||||
interface SVGImageProps extends React.SVGProps<SVGSVGElement> {
|
||||
src: React.FC<React.SVGProps<SVGSVGElement>> | any;
|
||||
width?: string | number;
|
||||
height?: string | number;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const SVGImage: React.FC<SVGImageProps> = ({
|
||||
src: IconComponent,
|
||||
width = "30px",
|
||||
height = "30px",
|
||||
className = "",
|
||||
...props
|
||||
}) => {
|
||||
return (
|
||||
<IconComponent
|
||||
fill="currentColor"
|
||||
width={width}
|
||||
height={height}
|
||||
className={`inline-block ${className}`}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default SVGImage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user