mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
moved components to TypeScript
This commit is contained in:
parent
85b8860862
commit
0a01c91271
54 changed files with 2771 additions and 5134 deletions
13
src/components/panels/Icon.tsx
Normal file
13
src/components/panels/Icon.tsx
Normal file
|
@ -0,0 +1,13 @@
|
|||
import * as React from 'react';
|
||||
|
||||
export const Icon = ({ icon, size = 32 }: { icon: string, size?: number }) => (
|
||||
<svg width={size} height={size} viewBox="0 0 32 32">
|
||||
<defs>
|
||||
<mask id={`icon-mask-${icon}`}>
|
||||
<use xlinkHref={`${require('$sprites/icon.svg')}#${icon}`} x={0} y={0} />
|
||||
</mask>
|
||||
</defs>
|
||||
<rect x="0" y="0" width="32" height="32" stroke="none" mask={`url(#icon-mask-${icon})`} />
|
||||
</svg>
|
||||
);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue