■ ■ ■ ■ ■ ■ ■
packages/web/src/components/ui/Icon/Icon.tsx
| skipped 3 lines |
4 | 4 | | import lines from '../../../assets/icons/sprite/lines.svg'; |
5 | 5 | | import external from '../../../assets/icons/sprite/external.svg'; |
6 | 6 | | import arrow from '../../../assets/icons/sprite/arrow.svg'; |
| 7 | + | import arrowDown from '../../../assets/icons/sprite/arrow-down.svg'; |
7 | 8 | | import bug from '../../../assets/icons/sprite/bug.svg'; |
8 | 9 | | import logo from '../../../assets/icons/sprite/logo.svg'; |
| 10 | + | import weight from '../../../assets/icons/sprite/weight.svg'; |
| 11 | + | import search from '../../../assets/icons/sprite/search.svg'; |
| 12 | + | import duplicate from '../../../assets/icons/sprite/duplicate.svg'; |
| 13 | + | import outdated from '../../../assets/icons/sprite/outdated.svg'; |
9 | 14 | | |
10 | | - | const icons = { githubLogo, grid, lines, external, arrow, bug, logo }; |
| 15 | + | const icons = { |
| 16 | + | githubLogo, |
| 17 | + | grid, |
| 18 | + | lines, |
| 19 | + | external, |
| 20 | + | arrow, |
| 21 | + | bug, |
| 22 | + | logo, |
| 23 | + | weight, |
| 24 | + | search, |
| 25 | + | duplicate, |
| 26 | + | outdated, |
| 27 | + | arrowDown, |
| 28 | + | }; |
11 | 29 | | |
12 | 30 | | export type IconProps = { |
13 | 31 | | kind: keyof typeof icons; |
| skipped 1 lines |
15 | 33 | | height?: number; |
16 | 34 | | className?: string; |
17 | 35 | | color?: string; |
| 36 | + | stroke?: string; |
18 | 37 | | onClick?: () => unknown; |
19 | 38 | | }; |
20 | 39 | | |
| skipped 1 lines |
22 | 41 | | width = 16, |
23 | 42 | | height = 16, |
24 | 43 | | color = '#A5A5A5', |
| 44 | + | stroke, |
25 | 45 | | className, |
26 | 46 | | kind, |
27 | 47 | | onClick, |
| skipped 7 lines |
35 | 55 | | viewBox={icons[kind].viewBox} |
36 | 56 | | fill='none' |
37 | 57 | | color={color} |
| 58 | + | stroke={stroke} |
38 | 59 | | xmlns='http://www.w3.org/2000/svg' |
39 | 60 | | > |
40 | 61 | | <use xlinkHref={`/sprite.svg#${icons[kind].id}`} /> |
| skipped 4 lines |