Skip to content

Commit

Permalink
chore: prettier the svg codegen file
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickDinh committed Mar 21, 2024
1 parent 10ff1c5 commit 7c1e89c
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 29 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"dev": "vite",
"build": "run-s build:*",
"build:0-clean": "rimraf dist src/features/common/components/icons src/features/common/components/svg",
"build:1-icons": "npx @svgr/cli --config-file .svgrrc.cjs --icon --typescript --out-dir src/features/common/components/icons src/assets/icons --no-index --no-prettier --filename-case kebab --jsx-runtime automatic",
"build:2-svg": "npx @svgr/cli --config-file .svgrrc.cjs --typescript --out-dir src/features/common/components/svg src/assets/svg --no-index --no-prettier --filename-case kebab --jsx-runtime automatic",
"build:1-icons": "npx @svgr/cli --config-file .svgrrc.cjs --icon --typescript --out-dir src/features/common/components/icons src/assets/icons --no-index --filename-case kebab --jsx-runtime automatic",
"build:2-svg": "npx @svgr/cli --config-file .svgrrc.cjs --typescript --out-dir src/features/common/components/svg src/assets/svg --no-index --filename-case kebab --jsx-runtime automatic",
"build:4-tsc": "tsc",
"build:5-vite": "vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
Expand Down
18 changes: 15 additions & 3 deletions src/features/common/components/icons/algorand.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
import type { SVGProps } from "react";
const SvgAlgorand = (props: SVGProps<SVGSVGElement>) => <svg xmlnsXlink="http://www.w3.org/1999/xlink" width="1em" height="1em" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" {...props}><g transform="matrix(1 0 0 1 -446 -347 )"><path d="M 1.7460317460317463 10 L 3.192239858906526 7.495590828924162 L 4.638447971781305 5 L 6.075837742504408 2.495590828924162 L 6.313932980599648 2.0987654320987654 L 6.419753086419753 2.495590828924162 L 6.860670194003527 4.144620811287478 L 6.3668430335097 5 L 4.920634920634921 7.495590828924162 L 3.4832451499118164 10 L 5.211640211640212 10 L 6.657848324514991 7.495590828924162 L 7.4074074074074066 6.1992945326278655 L 7.760141093474426 7.495590828924162 L 8.430335097001764 10 L 9.982363315696649 10 L 9.312169312169312 7.495590828924162 L 8.641975308641975 5 L 8.465608465608465 4.356261022927689 L 9.541446208112875 2.495590828924162 L 7.971781305114638 2.495590828924162 L 7.9188712522045845 2.310405643738977 L 7.372134038800706 0.26455026455026454 L 7.301587301587301 0 L 5.793650793650793 0 L 5.758377425044091 0.05291005291005291 L 4.347442680776014 2.495590828924162 L 2.901234567901235 5 L 1.4638447971781305 7.495590828924162 L 0.017636684303351177 10 L 1.7460317460317463 10 Z " fillRule="nonzero" fill="currentColor" stroke="none" transform="matrix(1 0 0 1 446 347 )" /></g></svg>;
export default SvgAlgorand;
import type { SVGProps } from 'react'
const SvgAlgorand = (props: SVGProps<SVGSVGElement>) => (
<svg xmlnsXlink="http://www.w3.org/1999/xlink" width="1em" height="1em" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" {...props}>
<g transform="matrix(1 0 0 1 -446 -347 )">
<path
d="M 1.7460317460317463 10 L 3.192239858906526 7.495590828924162 L 4.638447971781305 5 L 6.075837742504408 2.495590828924162 L 6.313932980599648 2.0987654320987654 L 6.419753086419753 2.495590828924162 L 6.860670194003527 4.144620811287478 L 6.3668430335097 5 L 4.920634920634921 7.495590828924162 L 3.4832451499118164 10 L 5.211640211640212 10 L 6.657848324514991 7.495590828924162 L 7.4074074074074066 6.1992945326278655 L 7.760141093474426 7.495590828924162 L 8.430335097001764 10 L 9.982363315696649 10 L 9.312169312169312 7.495590828924162 L 8.641975308641975 5 L 8.465608465608465 4.356261022927689 L 9.541446208112875 2.495590828924162 L 7.971781305114638 2.495590828924162 L 7.9188712522045845 2.310405643738977 L 7.372134038800706 0.26455026455026454 L 7.301587301587301 0 L 5.793650793650793 0 L 5.758377425044091 0.05291005291005291 L 4.347442680776014 2.495590828924162 L 2.901234567901235 5 L 1.4638447971781305 7.495590828924162 L 0.017636684303351177 10 L 1.7460317460317463 10 Z "
fillRule="nonzero"
fill="currentColor"
stroke="none"
transform="matrix(1 0 0 1 446 347 )"
/>
</g>
</svg>
)
export default SvgAlgorand
10 changes: 7 additions & 3 deletions src/features/common/components/icons/chevron-left.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import type { SVGProps } from "react";
const SvgChevronLeft = (props: SVGProps<SVGSVGElement>) => <svg width="1em" height="1em" viewBox="4 4 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M15 18L9 12L15 6" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" /></svg>;
export default SvgChevronLeft;
import type { SVGProps } from 'react'
const SvgChevronLeft = (props: SVGProps<SVGSVGElement>) => (
<svg width="1em" height="1em" viewBox="4 4 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path d="M15 18L9 12L15 6" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" />
</svg>
)
export default SvgChevronLeft
10 changes: 7 additions & 3 deletions src/features/common/components/icons/chevron-right.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import type { SVGProps } from "react";
const SvgChevronRight = (props: SVGProps<SVGSVGElement>) => <svg width="1em" height="1em" viewBox="4 4 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M9 6L15 12L9 18" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" /></svg>;
export default SvgChevronRight;
import type { SVGProps } from 'react'
const SvgChevronRight = (props: SVGProps<SVGSVGElement>) => (
<svg width="1em" height="1em" viewBox="4 4 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path d="M9 6L15 12L9 18" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" />
</svg>
)
export default SvgChevronRight
18 changes: 15 additions & 3 deletions src/features/common/components/icons/code-block.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
import type { SVGProps } from "react";
const SvgCodeBlock = (props: SVGProps<SVGSVGElement>) => <svg xmlnsXlink="http://www.w3.org/1999/xlink" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" {...props}><g transform="matrix(1 0 0 1 -15 -161 )"><path d="M 3 11 L 6.600000000000001 14.6 L 8 13.149999999999999 L 5.85 11 L 8 8.85 L 6.600000000000001 7.399999999999999 L 3 11 Z M 10 13.149999999999999 L 11.399999999999999 14.6 L 15 11 L 11.399999999999999 7.399999999999999 L 10 8.85 L 12.15 11 L 10 13.149999999999999 Z M 16 20 L 2 20 C 1.4500000000000002 20 0.9791666666666674 19.804166666666667 0.5875000000000004 19.4125 C 0.19583333333333375 19.020833333333332 0 18.55 0 18 L 0 4 C 0 3.4499999999999993 0.19583333333333375 2.9791666666666643 0.5875000000000004 2.5874999999999986 C 0.9791666666666674 2.1958333333333293 1.4500000000000002 1.9999999999999964 2 2 L 6.200000000000001 2 C 6.416666666666668 1.399999999999995 6.779166666666669 0.9166666666666607 7.287500000000001 0.5499999999999972 C 7.795833333333334 0.18333333333333002 8.366666666666667 0 9 0 C 9.633333333333333 0 10.20416666666667 0.18333333333333002 10.7125 0.5499999999999972 C 11.220833333333335 0.9166666666666607 11.583333333333336 1.399999999999995 11.8 2 L 16 2 C 16.55 1.9999999999999964 17.020833333333336 2.1958333333333293 17.4125 2.5874999999999986 C 17.80416666666667 2.9791666666666643 18.000000000000004 3.4499999999999993 18 4 L 18 18 C 18.000000000000004 18.55 17.80416666666667 19.020833333333332 17.4125 19.4125 C 17.020833333333336 19.804166666666667 16.55 20 16 20 Z M 2 4 L 2 18 L 16 18 L 16 4 L 2 4 Z M 8.4625 3.037499999999998 C 8.604166666666668 3.1791666666666636 8.783333333333335 3.25 9 3.25 C 9.216666666666669 3.25 9.395833333333336 3.1791666666666636 9.537500000000001 3.037499999999998 C 9.679166666666669 2.8958333333333286 9.750000000000002 2.7166666666666615 9.75 2.5 C 9.750000000000002 2.2833333333333314 9.679166666666669 2.1041666666666643 9.537500000000001 1.9624999999999986 C 9.395833333333336 1.8208333333333293 9.216666666666669 1.75 9 1.75 C 8.783333333333335 1.75 8.604166666666668 1.8208333333333293 8.4625 1.9624999999999986 C 8.320833333333335 2.1041666666666643 8.250000000000002 2.2833333333333314 8.25 2.5 C 8.250000000000002 2.7166666666666615 8.320833333333335 2.8958333333333286 8.4625 3.037499999999998 Z M 2 4 L 2 18 L 2 4 Z " fillRule="nonzero" fill="currentColor" stroke="none" transform="matrix(1 0 0 1 15 161 )" /></g></svg>;
export default SvgCodeBlock;
import type { SVGProps } from 'react'
const SvgCodeBlock = (props: SVGProps<SVGSVGElement>) => (
<svg xmlnsXlink="http://www.w3.org/1999/xlink" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" {...props}>
<g transform="matrix(1 0 0 1 -15 -161 )">
<path
d="M 3 11 L 6.600000000000001 14.6 L 8 13.149999999999999 L 5.85 11 L 8 8.85 L 6.600000000000001 7.399999999999999 L 3 11 Z M 10 13.149999999999999 L 11.399999999999999 14.6 L 15 11 L 11.399999999999999 7.399999999999999 L 10 8.85 L 12.15 11 L 10 13.149999999999999 Z M 16 20 L 2 20 C 1.4500000000000002 20 0.9791666666666674 19.804166666666667 0.5875000000000004 19.4125 C 0.19583333333333375 19.020833333333332 0 18.55 0 18 L 0 4 C 0 3.4499999999999993 0.19583333333333375 2.9791666666666643 0.5875000000000004 2.5874999999999986 C 0.9791666666666674 2.1958333333333293 1.4500000000000002 1.9999999999999964 2 2 L 6.200000000000001 2 C 6.416666666666668 1.399999999999995 6.779166666666669 0.9166666666666607 7.287500000000001 0.5499999999999972 C 7.795833333333334 0.18333333333333002 8.366666666666667 0 9 0 C 9.633333333333333 0 10.20416666666667 0.18333333333333002 10.7125 0.5499999999999972 C 11.220833333333335 0.9166666666666607 11.583333333333336 1.399999999999995 11.8 2 L 16 2 C 16.55 1.9999999999999964 17.020833333333336 2.1958333333333293 17.4125 2.5874999999999986 C 17.80416666666667 2.9791666666666643 18.000000000000004 3.4499999999999993 18 4 L 18 18 C 18.000000000000004 18.55 17.80416666666667 19.020833333333332 17.4125 19.4125 C 17.020833333333336 19.804166666666667 16.55 20 16 20 Z M 2 4 L 2 18 L 16 18 L 16 4 L 2 4 Z M 8.4625 3.037499999999998 C 8.604166666666668 3.1791666666666636 8.783333333333335 3.25 9 3.25 C 9.216666666666669 3.25 9.395833333333336 3.1791666666666636 9.537500000000001 3.037499999999998 C 9.679166666666669 2.8958333333333286 9.750000000000002 2.7166666666666615 9.75 2.5 C 9.750000000000002 2.2833333333333314 9.679166666666669 2.1041666666666643 9.537500000000001 1.9624999999999986 C 9.395833333333336 1.8208333333333293 9.216666666666669 1.75 9 1.75 C 8.783333333333335 1.75 8.604166666666668 1.8208333333333293 8.4625 1.9624999999999986 C 8.320833333333335 2.1041666666666643 8.250000000000002 2.2833333333333314 8.25 2.5 C 8.250000000000002 2.7166666666666615 8.320833333333335 2.8958333333333286 8.4625 3.037499999999998 Z M 2 4 L 2 18 L 2 4 Z "
fillRule="nonzero"
fill="currentColor"
stroke="none"
transform="matrix(1 0 0 1 15 161 )"
/>
</g>
</svg>
)
export default SvgCodeBlock
18 changes: 15 additions & 3 deletions src/features/common/components/icons/home.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
import type { SVGProps } from "react";
const SvgHome = (props: SVGProps<SVGSVGElement>) => <svg xmlnsXlink="http://www.w3.org/1999/xlink" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" {...props}><g transform="matrix(1 0 0 1 -14 -66 )"><path d="M 3 17 L 8 17 L 8 11 L 12 11 L 12 17 L 17 17 L 17 9 L 20 9 L 10 0 L 0 9 L 3 9 L 3 17 Z " fillRule="nonzero" fill="currentColor" stroke="none" transform="matrix(1 0 0 1 14 66 )" /></g></svg>;
export default SvgHome;
import type { SVGProps } from 'react'
const SvgHome = (props: SVGProps<SVGSVGElement>) => (
<svg xmlnsXlink="http://www.w3.org/1999/xlink" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" {...props}>
<g transform="matrix(1 0 0 1 -14 -66 )">
<path
d="M 3 17 L 8 17 L 8 11 L 12 11 L 12 17 L 17 17 L 17 9 L 20 9 L 10 0 L 0 9 L 3 9 L 3 17 Z "
fillRule="nonzero"
fill="currentColor"
stroke="none"
transform="matrix(1 0 0 1 14 66 )"
/>
</g>
</svg>
)
export default SvgHome
18 changes: 15 additions & 3 deletions src/features/common/components/icons/wallet.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
import type { SVGProps } from "react";
const SvgWallet = (props: SVGProps<SVGSVGElement>) => <svg xmlnsXlink="http://www.w3.org/1999/xlink" width="1em" height="1em" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" {...props}><g transform="matrix(1 0 0 1 -12 -114 )"><path d="M 23.46 0.5343749999999992 C 23.82 0.890625 24 1.3062499999999975 24 1.78125 L 24 17.21875 C 24 17.693749999999998 23.82 18.109375 23.46 18.465625 C 23.1 18.821875000000002 22.68 19 22.200000000000003 19 L 1.7999999999999998 19 C 1.3200000000000003 19 0.8999999999999999 18.821875000000002 0.5400000000000003 18.465625 C 0.17999999999999988 18.109375 0 17.693749999999998 0 17.21875 L 0 1.78125 C 0 1.3062499999999975 0.17999999999999988 0.890625 0.5400000000000003 0.5343749999999992 C 0.8999999999999999 0.1781249999999983 1.3200000000000003 0 1.7999999999999998 0 L 22.200000000000003 0 C 22.68 0 23.1 0.1781249999999983 23.46 0.5343749999999992 Z M 1.7999999999999998 2 L 1.7999999999999998 5 L 22.200000000000003 5 L 22.200000000000003 2 L 1.7999999999999998 2 Z M 22.200000000000003 9 L 1.7999999999999998 9 L 1.7999999999999998 17 L 22.200000000000003 17 L 22.200000000000003 9 Z M 2 1.78125 L 2 17.21875 L 2 1.78125 Z " fillRule="nonzero" fill="currentColor" stroke="none" transform="matrix(1 0 0 1 12 114 )" /></g></svg>;
export default SvgWallet;
import type { SVGProps } from 'react'
const SvgWallet = (props: SVGProps<SVGSVGElement>) => (
<svg xmlnsXlink="http://www.w3.org/1999/xlink" width="1em" height="1em" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" {...props}>
<g transform="matrix(1 0 0 1 -12 -114 )">
<path
d="M 23.46 0.5343749999999992 C 23.82 0.890625 24 1.3062499999999975 24 1.78125 L 24 17.21875 C 24 17.693749999999998 23.82 18.109375 23.46 18.465625 C 23.1 18.821875000000002 22.68 19 22.200000000000003 19 L 1.7999999999999998 19 C 1.3200000000000003 19 0.8999999999999999 18.821875000000002 0.5400000000000003 18.465625 C 0.17999999999999988 18.109375 0 17.693749999999998 0 17.21875 L 0 1.78125 C 0 1.3062499999999975 0.17999999999999988 0.890625 0.5400000000000003 0.5343749999999992 C 0.8999999999999999 0.1781249999999983 1.3200000000000003 0 1.7999999999999998 0 L 22.200000000000003 0 C 22.68 0 23.1 0.1781249999999983 23.46 0.5343749999999992 Z M 1.7999999999999998 2 L 1.7999999999999998 5 L 22.200000000000003 5 L 22.200000000000003 2 L 1.7999999999999998 2 Z M 22.200000000000003 9 L 1.7999999999999998 9 L 1.7999999999999998 17 L 22.200000000000003 17 L 22.200000000000003 9 Z M 2 1.78125 L 2 17.21875 L 2 1.78125 Z "
fillRule="nonzero"
fill="currentColor"
stroke="none"
transform="matrix(1 0 0 1 12 114 )"
/>
</g>
</svg>
)
export default SvgWallet
24 changes: 21 additions & 3 deletions src/features/common/components/svg/circle.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
import type { SVGProps } from "react";
const SvgCircle = (props: SVGProps<SVGSVGElement>) => <svg xmlnsXlink="http://www.w3.org/1999/xlink" width="21px" height="21px" viewBox="0 0 21 21" xmlns="http://www.w3.org/2000/svg" {...props}><g transform="matrix(1 0 0 1 -153 -143 )"><path d="M 163.5 143 C 169.38 143 174 147.62 174 153.5 C 174 159.38 169.38 164 163.5 164 C 157.62 164 153 159.38 153 153.5 C 153 147.62 157.62 143 163.5 143 Z " fillRule="nonzero" fill="currentColor" stroke="none" /></g></svg>;
export default SvgCircle;
import type { SVGProps } from 'react'
const SvgCircle = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlnsXlink="http://www.w3.org/1999/xlink"
width="21px"
height="21px"
viewBox="0 0 21 21"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<g transform="matrix(1 0 0 1 -153 -143 )">
<path
d="M 163.5 143 C 169.38 143 174 147.62 174 153.5 C 174 159.38 169.38 164 163.5 164 C 157.62 164 153 159.38 153 153.5 C 153 147.62 157.62 143 163.5 143 Z "
fillRule="nonzero"
fill="currentColor"
stroke="none"
/>
</g>
</svg>
)
export default SvgCircle
23 changes: 20 additions & 3 deletions src/features/common/components/svg/pointer-left.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
import type { SVGProps } from "react";
const SvgPointerLeft = (props: SVGProps<SVGSVGElement>) => <svg xmlnsXlink="http://www.w3.org/1999/xlink" width="11px" height="19px" preserveAspectRatio="xMinYMid meet" viewBox="159 229 7 10" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M 165.8 228.1 L 159.1 234.1 L 165.8 240.1 L 163.5 234.1 L 165.8 228.1 Z" fillRule="nonzero" fill="currentColor" stroke="none" /></svg>;
export default SvgPointerLeft;
import type { SVGProps } from 'react'
const SvgPointerLeft = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlnsXlink="http://www.w3.org/1999/xlink"
width="11px"
height="19px"
preserveAspectRatio="xMinYMid meet"
viewBox="159 229 7 10"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M 165.8 228.1 L 159.1 234.1 L 165.8 240.1 L 163.5 234.1 L 165.8 228.1 Z"
fillRule="nonzero"
fill="currentColor"
stroke="none"
/>
</svg>
)
export default SvgPointerLeft
18 changes: 15 additions & 3 deletions src/features/common/components/svg/pointer-right.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
import type { SVGProps } from "react";
const SvgPointerRight = (props: SVGProps<SVGSVGElement>) => <svg xmlnsXlink="http://www.w3.org/1999/xlink" width="11px" height="19px" preserveAspectRatio="xMinYMid meet" viewBox="340 139 1 13" xmlns="http://www.w3.org/2000/svg" {...props}><path d="M 340.3 151.3 L 347 145.3 L 340.3 139.3 L 342.6 145.3 L 340.3 151.3 Z" fillRule="nonzero" fill="currentColor" stroke="none" /></svg>;
export default SvgPointerRight;
import type { SVGProps } from 'react'
const SvgPointerRight = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlnsXlink="http://www.w3.org/1999/xlink"
width="11px"
height="19px"
preserveAspectRatio="xMinYMid meet"
viewBox="340 139 1 13"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path d="M 340.3 151.3 L 347 145.3 L 340.3 139.3 L 342.6 145.3 L 340.3 151.3 Z" fillRule="nonzero" fill="currentColor" stroke="none" />
</svg>
)
export default SvgPointerRight

0 comments on commit 7c1e89c

Please sign in to comment.