1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00
vault-frontend/src/components/common/Icon/index.tsx
2023-11-20 22:35:07 +06:00

21 lines
449 B
TypeScript

import { FC, SVGAttributes } from 'react';
import { IIcon } from '~/types';
type IProps = SVGAttributes<SVGElement> & {
size?: number;
icon: IIcon;
};
export const Icon: FC<IProps> = ({ size = 20, icon, style, ...props }) => (
<svg
width={size}
height={size}
viewBox="0 0 24 24"
preserveAspectRatio="xMidYMid slice"
style={{ ...style, outline: 'none' }}
{...props}
>
<use xlinkHref={`#${icon}`} />
</svg>
);