mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
23 lines
449 B
TypeScript
23 lines
449 B
TypeScript
import React, { FC } from 'react';
|
|
|
|
import { IIcon } from '~/types';
|
|
|
|
type IProps = React.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>
|
|
);
|