Skip to content

Commit

Permalink
Don't multiple svgs tag
Browse files Browse the repository at this point in the history
`createIcon` add the svg tag by default. Let's remove the unnecessary extra tag.
  • Loading branch information
kkosiorowska committed Dec 6, 2023
1 parent 2dca2bf commit 5fafc57
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 115 deletions.
54 changes: 23 additions & 31 deletions dapp/src/static/icons/Bitcoin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,28 @@ import { createIcon } from "@chakra-ui/react"
export const Bitcoin = createIcon({
displayName: "Bitcoin",
viewBox: "0 0 28 28",
path: (
<svg
width="28"
height="28"
viewBox="0 0 28 28"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_1935_2913)">
<rect width="28" height="28" rx="14" fill="black" />
<g clipPath="url(#clip1_1935_2913)">
<path
d="M17.9643 13.4608C18.7339 13.0656 19.2154 12.3698 19.1029 11.2105C18.9515 9.62618 17.5942 9.09493 15.8808 8.94364L15.8805 6.74609H14.5529L14.5526 8.88584C14.2033 8.88584 13.8472 8.89276 13.4928 8.89993L13.4925 6.74639L12.1661 6.74626L12.1659 8.94326C11.8784 8.94918 11.5961 8.9548 11.3205 8.9548V8.9483L9.48941 8.94755L9.48966 10.376C9.48966 10.376 10.47 10.3574 10.4539 10.3754C10.9914 10.3758 11.1669 10.6904 11.2174 10.9619L11.2178 13.4654V16.9819C11.1941 17.1523 11.0945 17.4246 10.7187 17.4251C10.7358 17.4403 9.75299 17.425 9.75299 17.425L9.48966 19.0223H11.217C11.5388 19.0226 11.8551 19.0277 12.1653 19.0302L12.1665 21.2526L13.4925 21.253L13.4921 19.0538C13.8569 19.0613 14.2091 19.0646 14.553 19.0641L14.5526 21.253H15.8801L15.8809 19.0343C18.1123 18.9051 19.6745 18.3386 19.8687 16.2266C20.0253 14.5262 19.2312 13.7672 17.9643 13.4608ZM13.5245 10.4724C14.2732 10.4724 16.6279 10.2321 16.6282 11.8084C16.6279 13.3196 14.2739 13.1431 13.5245 13.1431V10.4724ZM13.5239 17.436L13.5245 14.4913C14.4241 14.4911 17.2456 14.2304 17.2459 15.963C17.2463 17.6245 14.4241 17.4353 13.5239 17.436Z"
fill="white"
/>
</g>
path: [
<g clipPath="url(#clip0_1935_2913)">
<rect width="28" height="28" rx="14" fill="black" />
<g clipPath="url(#clip1_1935_2913)">
<path
d="M17.9643 13.4608C18.7339 13.0656 19.2154 12.3698 19.1029 11.2105C18.9515 9.62618 17.5942 9.09493 15.8808 8.94364L15.8805 6.74609H14.5529L14.5526 8.88584C14.2033 8.88584 13.8472 8.89276 13.4928 8.89993L13.4925 6.74639L12.1661 6.74626L12.1659 8.94326C11.8784 8.94918 11.5961 8.9548 11.3205 8.9548V8.9483L9.48941 8.94755L9.48966 10.376C9.48966 10.376 10.47 10.3574 10.4539 10.3754C10.9914 10.3758 11.1669 10.6904 11.2174 10.9619L11.2178 13.4654V16.9819C11.1941 17.1523 11.0945 17.4246 10.7187 17.4251C10.7358 17.4403 9.75299 17.425 9.75299 17.425L9.48966 19.0223H11.217C11.5388 19.0226 11.8551 19.0277 12.1653 19.0302L12.1665 21.2526L13.4925 21.253L13.4921 19.0538C13.8569 19.0613 14.2091 19.0646 14.553 19.0641L14.5526 21.253H15.8801L15.8809 19.0343C18.1123 18.9051 19.6745 18.3386 19.8687 16.2266C20.0253 14.5262 19.2312 13.7672 17.9643 13.4608ZM13.5245 10.4724C14.2732 10.4724 16.6279 10.2321 16.6282 11.8084C16.6279 13.3196 14.2739 13.1431 13.5245 13.1431V10.4724ZM13.5239 17.436L13.5245 14.4913C14.4241 14.4911 17.2456 14.2304 17.2459 15.963C17.2463 17.6245 14.4241 17.4353 13.5239 17.436Z"
fill="white"
/>
</g>
<defs>
<clipPath id="clip0_1935_2913">
<rect width="28" height="28" rx="14" fill="white" />
</clipPath>
<clipPath id="clip1_1935_2913">
<rect
width="11.3014"
height="15"
fill="white"
transform="translate(9 6.5)"
/>
</clipPath>
</defs>
</svg>
),
</g>,
<defs>
<clipPath id="clip0_1935_2913">
<rect width="28" height="28" rx="14" fill="white" />
</clipPath>
<clipPath id="clip1_1935_2913">
<rect
width="11.3014"
height="15"
fill="white"
transform="translate(9 6.5)"
/>
</clipPath>
</defs>,
],
})
21 changes: 5 additions & 16 deletions dapp/src/static/icons/ChevronRight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,11 @@ import { createIcon } from "@chakra-ui/react"

export const ChevronRight = createIcon({
displayName: "ChevronRight",
viewBox: "0 0 16 16",
viewBox: "0 0 20 20",
path: (
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6 12L10 8L6 4"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="square"
strokeLinejoin="round"
/>
</svg>
<path
fill="currentColor"
d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
/>
),
})
76 changes: 34 additions & 42 deletions dapp/src/static/icons/Ethereum.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,38 @@ import { createIcon } from "@chakra-ui/react"
export const Ethereum = createIcon({
displayName: "Ethereum",
viewBox: "0 0 28 28",
path: (
<svg
width="28"
height="28"
viewBox="0 0 28 28"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_2093_38934)">
<rect width="28" height="28" rx="14" fill="#232323" />
<path
d="M13.9984 3.6004L13.8564 4.07437V17.8278L13.9984 17.967L20.4964 14.1933L13.9984 3.6004Z"
fill="#4E4E4E"
/>
<path
d="M13.9981 3.6004L7.5 14.1933L13.9981 17.967V11.2915V3.6004Z"
fill="#C5C5C5"
/>
<path
d="M13.9979 19.1767L13.918 19.2725V24.1717L13.9979 24.4013L20.4999 15.4049L13.9979 19.1767Z"
fill="#3C3C3B"
/>
<path
d="M13.9981 24.4013V19.1767L7.5 15.4049L13.9981 24.4013Z"
fill="#C5C5C5"
/>
<path
d="M13.998 17.9672L20.496 14.1936L13.998 11.2918V17.9672Z"
fill="#141414"
/>
<path
d="M7.5 14.1936L13.998 17.9672V11.2918L7.5 14.1936Z"
fill="#393939"
/>
</g>
<defs>
<clipPath id="clip0_2093_38934">
<rect width="28" height="28" rx="14" fill="white" />
</clipPath>
</defs>
</svg>
),
path: [
<g clipPath="url(#clip0_2093_38934)">
<rect width="28" height="28" rx="14" fill="#232323" />
<path
d="M13.9984 3.6004L13.8564 4.07437V17.8278L13.9984 17.967L20.4964 14.1933L13.9984 3.6004Z"
fill="#4E4E4E"
/>
<path
d="M13.9981 3.6004L7.5 14.1933L13.9981 17.967V11.2915V3.6004Z"
fill="#C5C5C5"
/>
<path
d="M13.9979 19.1767L13.918 19.2725V24.1717L13.9979 24.4013L20.4999 15.4049L13.9979 19.1767Z"
fill="#3C3C3B"
/>
<path
d="M13.9981 24.4013V19.1767L7.5 15.4049L13.9981 24.4013Z"
fill="#C5C5C5"
/>
<path
d="M13.998 17.9672L20.496 14.1936L13.998 11.2918V17.9672Z"
fill="#141414"
/>
<path
d="M7.5 14.1936L13.998 17.9672V11.2918L7.5 14.1936Z"
fill="#393939"
/>
</g>,
<defs>
<clipPath id="clip0_2093_38934">
<rect width="28" height="28" rx="14" fill="white" />
</clipPath>
</defs>,
],
})
34 changes: 8 additions & 26 deletions dapp/src/static/icons/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,12 @@ import { createIcon } from "@chakra-ui/react"

export const Info = createIcon({
displayName: "Info",
viewBox: "0 0 16 16",
path: (
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_1935_3507)">
<path
d="M2.6967 2.6967C4.10322 1.29018 6.01087 0.5 8 0.5C9.48336 0.5 10.9334 0.939867 12.1668 1.76398C13.4001 2.58809 14.3614 3.75943 14.9291 5.12987C15.4967 6.50032 15.6453 8.00832 15.3559 9.46317C15.0665 10.918 14.3522 12.2544 13.3033 13.3033C12.2544 14.3522 10.918 15.0665 9.46317 15.3559C8.00832 15.6453 6.50032 15.4967 5.12987 14.9291C3.75943 14.3614 2.58809 13.4001 1.76398 12.1668C0.939867 10.9334 0.5 9.48336 0.5 8C0.5 6.01087 1.29018 4.10322 2.6967 2.6967Z"
stroke="currentColor"
/>
<path
d="M8.80875 5.61622C8.89099 5.62381 8.97401 5.61566 9.05283 5.59223C9.13165 5.56881 9.20466 5.53059 9.26748 5.47988C9.3303 5.42918 9.38164 5.36701 9.41843 5.29712C9.45521 5.22722 9.47668 5.15104 9.48156 5.07312L9.57782 4.57349C9.60208 4.50175 9.60644 4.42533 9.59046 4.35156C9.57448 4.27778 9.53871 4.20911 9.48657 4.15214C9.43444 4.09517 9.36768 4.0518 9.29271 4.0262C9.21774 4.00059 9.13706 3.9936 9.05841 4.00591H8.19624C8.114 3.99845 8.03101 4.00675 7.95225 4.0303C7.87348 4.05385 7.80055 4.09217 7.73784 4.14297C7.67512 4.19377 7.6239 4.25601 7.58724 4.32595C7.55058 4.39588 7.52924 4.47209 7.52449 4.55L7.42823 5.06013C7.35629 5.40987 7.56046 5.61572 7.94447 5.61572L8.80875 5.61622ZM8.68815 12C9.10813 12 9.25253 11.8641 9.30013 11.6258L9.4202 11.0022C9.43117 10.9672 9.43278 10.93 9.42489 10.8942C9.417 10.8584 9.39986 10.825 9.37499 10.797C9.35012 10.7689 9.31829 10.7471 9.28234 10.7335C9.2464 10.7199 9.20744 10.7149 9.16895 10.7189H8.73681C8.49668 10.7189 8.42474 10.651 8.47235 10.4466L9.24089 6.73889C9.32499 6.35317 9.14462 6.19479 8.77278 6.19479H6.90035C6.81443 6.19375 6.73094 6.22171 6.6649 6.27364C6.59887 6.32558 6.55463 6.39807 6.54014 6.47808L6.40791 7.15858C6.398 7.19314 6.39728 7.22948 6.40581 7.26437C6.41435 7.29926 6.43188 7.33161 6.45685 7.35856C6.48182 7.3855 6.51345 7.40621 6.54893 7.41882C6.5844 7.43144 6.62263 7.43558 6.66021 7.43087H7.17645L6.58775 10.2993C6.35978 11.4104 6.82789 11.998 8.11214 11.998L8.68815 12Z"
fill="currentColor"
/>
</g>
<defs>
<clipPath id="clip0_1935_3507">
<rect width="16" height="16" fill="white" />
</clipPath>
</defs>
</svg>
),
viewBox: "0 0 20 20",
path: [
<rect width="20" height="20" rx="10" fill="currentColor" />,
<path
d="M11.1619 6.92432C11.2802 6.93572 11.3995 6.92348 11.5128 6.88835C11.6261 6.85321 11.7311 6.79589 11.8214 6.71983C11.9117 6.64376 11.9855 6.55052 12.0383 6.44568C12.0912 6.34084 12.1221 6.22655 12.1291 6.10968L12.2675 5.36023C12.3024 5.25263 12.3086 5.138 12.2856 5.02733C12.2627 4.91667 12.2113 4.81367 12.1363 4.72821C12.0614 4.64276 11.9654 4.57771 11.8576 4.5393C11.7499 4.50089 11.6339 4.49041 11.5208 4.50886H10.2815C10.1632 4.49767 10.0439 4.51012 9.93071 4.54545C9.81749 4.58078 9.71266 4.63826 9.6225 4.71446C9.53234 4.79066 9.45871 4.88401 9.40601 4.98892C9.35332 5.09383 9.32264 5.20814 9.31582 5.325L9.17744 6.09019C9.07403 6.6148 9.36752 6.92357 9.91953 6.92357L11.1619 6.92432ZM10.9886 15.5C11.5923 15.5 11.7999 15.2961 11.8683 14.9387L12.0409 14.0034C12.0567 13.9507 12.059 13.8951 12.0476 13.8414C12.0363 13.7876 12.0117 13.7375 11.9759 13.6954C11.9402 13.6534 11.8944 13.6207 11.8427 13.6003C11.7911 13.5798 11.7351 13.5723 11.6797 13.5784H11.0585C10.7133 13.5784 10.6099 13.4765 10.6784 13.17L11.7831 8.60833C11.904 8.02976 11.6448 7.79218 11.1102 7.79218H8.41861C8.2951 7.79062 8.17508 7.83256 8.08016 7.91047C7.98523 7.98837 7.92164 8.09711 7.90082 8.21712L7.71073 9.23786C7.69648 9.28971 7.69544 9.34422 7.70772 9.39655C7.71999 9.44889 7.74519 9.49742 7.78108 9.53784C7.81697 9.57826 7.86244 9.60931 7.91344 9.62823C7.96444 9.64716 8.01939 9.65337 8.07342 9.64631H8.81551L7.96925 12.9489C7.64154 14.6157 8.31445 15.497 10.1606 15.497L10.9886 15.5Z"
fill="white"
/>,
],
})

0 comments on commit 5fafc57

Please sign in to comment.