Skip to content

Commit

Permalink
fix svg id has colon error (#1928)
Browse files Browse the repository at this point in the history
Co-authored-by: YanHui <yanhui@growingio.com>
  • Loading branch information
hiker90 and YanHui authored Mar 25, 2022
1 parent 7617471 commit f1fad4f
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 94 deletions.
36 changes: 18 additions & 18 deletions src/page/svg/DeletedSVG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { InjectRandomIds } from '.';

const ForbiddenSVG = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElement>>((props, ref) => (
<svg viewBox="0 0 450 288" fill="none" xmlns="http://www.w3.org/2000/svg" ref={ref} {...props}>
<path d="M0 273.292C178.037 216.941 276.79 217.644 450 273.292H0Z" fill="url(#paint0_linear_7150:7006)" />
<path d="M0 273.292C178.037 216.941 276.79 217.644 450 273.292H0Z" fill="url(#delete_prefix_paint0_linear)" />
<path
d="M329 10C399 38.1373 379 200 247 223C115.001 246 78.3701 191.892 69.685 145.446C61 99.0004 94 55.9998 155 39.9999C216.001 23.9999 259.001 -18.1373 329 10Z"
fill="url(#paint1_linear_7150:7006)"
fill="url(#delete_prefix_paint1_linear)"
/>
<path
opacity="0.1"
Expand All @@ -19,12 +19,12 @@ const ForbiddenSVG = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElem
/>
<path
d="M144.231 239.923L226.385 281.769V162.077L137.154 130.077L144.231 239.923Z"
fill="url(#paint2_linear_7150:7006)"
fill="url(#delete_prefix_paint2_linear)"
/>
<path d="M310.692 131L307.923 237.769L226.692 282.077V162.077L310.692 131Z" fill="url(#paint3_linear_7150:7006)" />
<path d="M310.692 131L307.923 237.769L226.692 282.077V162.077L310.692 131Z" fill="url(#delete_prefix_paint3_linear)" />
<path
d="M311 130.692L224.846 103.923L136.538 130.692L227 162.384L311 130.692Z"
fill="url(#paint4_linear_7150:7006)"
fill="url(#delete_prefix_paint4_linear)"
/>
<g opacity="0.1">
<path
Expand All @@ -42,7 +42,7 @@ const ForbiddenSVG = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElem
</g>
<path
d="M176.231 196.846L226.692 162.385L136.846 130.385L87 161.462L176.231 196.846Z"
fill="url(#paint5_linear_7150:7006)"
fill="url(#delete_prefix_paint5_linear)"
/>
<g opacity="0.3">
<path
Expand All @@ -53,15 +53,15 @@ const ForbiddenSVG = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElem
</g>
<path
d="M363 159.616L312.231 131.308L226.692 162.385L276.231 198.077L363 159.616Z"
fill="url(#paint6_linear_7150:7006)"
fill="url(#delete_prefix_paint6_linear)"
/>
<path
d="M189.769 71.6156L225.154 104.231L137.154 130.693L100.231 93.7695L189.769 71.6156Z"
fill="url(#paint7_linear_7150:7006)"
fill="url(#delete_prefix_paint7_linear)"
/>
<path
d="M258.692 71L347.615 92.2308L311.308 130.692L225.769 104.231L258.692 71Z"
fill="url(#paint8_linear_7150:7006)"
fill="url(#delete_prefix_paint8_linear)"
/>
<g opacity="0.2">
<path
Expand All @@ -72,7 +72,7 @@ const ForbiddenSVG = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElem
</g>
<defs>
<linearGradient
id="paint0_linear_7150:7006"
id="delete_prefix_paint0_linear"
x1="226.815"
y1="231.298"
x2="226.815"
Expand All @@ -83,12 +83,12 @@ const ForbiddenSVG = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElem
<stop offset="0.9999" stopColor="white" stopOpacity="0.453125" />
<stop offset="1" stopColor="white" />
</linearGradient>
<linearGradient id="paint1_linear_7150:7006" x1="245" y1="28" x2="249" y2="202" gradientUnits="userSpaceOnUse">
<linearGradient id="delete_prefix_paint1_linear" x1="245" y1="28" x2="249" y2="202" gradientUnits="userSpaceOnUse">
<stop stopColor="#F8FAFF" />
<stop offset="1" stopColor="#E7F0FF" />
</linearGradient>
<linearGradient
id="paint2_linear_7150:7006"
id="delete_prefix_paint2_linear"
x1="140.5"
y1="196"
x2="226"
Expand All @@ -98,12 +98,12 @@ const ForbiddenSVG = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElem
<stop stopColor="#94AFFF" />
<stop offset="1" stopColor="#ABC0FF" stopOpacity="0" />
</linearGradient>
<linearGradient id="paint3_linear_7150:7006" x1="227" y1="210.5" x2="311" y2="203" gradientUnits="userSpaceOnUse">
<linearGradient id="delete_prefix_paint3_linear" x1="227" y1="210.5" x2="311" y2="203" gradientUnits="userSpaceOnUse">
<stop stopColor="#BDCEFF" />
<stop offset="1" stopColor="#9CB5FF" />
</linearGradient>
<linearGradient
id="paint4_linear_7150:7006"
id="delete_prefix_paint4_linear"
x1="223.769"
y1="103.923"
x2="226.5"
Expand All @@ -113,12 +113,12 @@ const ForbiddenSVG = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElem
<stop stopColor="#AEC3FF" />
<stop offset="1" stopColor="#648CFF" />
</linearGradient>
<linearGradient id="paint5_linear_7150:7006" x1="181" y1="144" x2="138" y2="189" gradientUnits="userSpaceOnUse">
<linearGradient id="delete_prefix_paint5_linear" x1="181" y1="144" x2="138" y2="189" gradientUnits="userSpaceOnUse">
<stop stopColor="#D6E4FF" />
<stop offset="1" stopColor="#C3D8FF" />
</linearGradient>
<linearGradient
id="paint6_linear_7150:7006"
id="delete_prefix_paint6_linear"
x1="241.5"
y1="161"
x2="343.5"
Expand All @@ -129,7 +129,7 @@ const ForbiddenSVG = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElem
<stop offset="1" stopColor="#AAC8FF" />
</linearGradient>
<linearGradient
id="paint7_linear_7150:7006"
id="delete_prefix_paint7_linear"
x1="127"
y1="93.5004"
x2="218.5"
Expand All @@ -139,7 +139,7 @@ const ForbiddenSVG = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElem
<stop stopColor="#C4D8FF" />
<stop offset="1" stopColor="#ADCAFF" />
</linearGradient>
<linearGradient id="paint8_linear_7150:7006" x1="307" y1="84" x2="274" y2="115.5" gradientUnits="userSpaceOnUse">
<linearGradient id="delete_prefix_paint8_linear" x1="307" y1="84" x2="274" y2="115.5" gradientUnits="userSpaceOnUse">
<stop stopColor="#B5CFFF" />
<stop offset="1" stopColor="#CADDFF" />
</linearGradient>
Expand Down
36 changes: 18 additions & 18 deletions src/page/svg/EmptyImageSVG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { InjectRandomIds } from '.';
const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElement>>((props, ref) => (
<svg role="img" aria-labelledby="title" viewBox="0 0 300 193" fill="none" ref={ref} {...props}>
<title id="title">Dashboard image</title>
<rect x={59} y={14.118} width={182.432} height={121.622} rx={4} fill="url(#prefix__paint0_linear)" />
<rect x={59} y={14.118} width={182.432} height={121.622} rx={4} fill="url(#empty_prefix_paint0_linear)" />
<g opacity={0.8}>
<rect x={71.28} y={29.32} width={62.331} height={41.047} rx={4} fill="#fff" />
<rect
Expand All @@ -14,7 +14,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
height={4.561}
rx={2.28}
transform="rotate(90 98.644 33.88)"
fill="url(#prefix__paint1_linear)"
fill="url(#empty_prefix_paint1_linear)"
/>
<rect
x={86.482}
Expand All @@ -23,7 +23,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
height={4.561}
rx={2.28}
transform="rotate(90 86.482 41.482)"
fill="url(#prefix__paint2_linear)"
fill="url(#empty_prefix_paint2_linear)"
/>
<rect
x={110.807}
Expand All @@ -32,7 +32,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
height={4.561}
rx={2.28}
transform="rotate(90 110.807 49.083)"
fill="url(#prefix__paint3_linear)"
fill="url(#empty_prefix_paint3_linear)"
/>
<rect
x={122.969}
Expand All @@ -41,7 +41,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
height={4.561}
rx={2.28}
transform="rotate(90 122.969 41.482)"
fill="url(#prefix__paint4_linear)"
fill="url(#empty_prefix_paint4_linear)"
/>
</g>
<g opacity={0.8}>
Expand All @@ -50,7 +50,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
fillRule="evenodd"
clipRule="evenodd"
d="M212.623 76.606l-32.345.06 16.519-28.735a30.557 30.557 0 00-14.881-3.81c-16.955.03-30.675 13.801-30.644 30.757.032 16.955 13.802 30.675 30.757 30.644 16.338-.03 29.671-12.816 30.594-28.916z"
fill="url(#prefix__paint5_linear)"
fill="url(#empty_prefix_paint5_linear)"
/>
<path
opacity={0.8}
Expand All @@ -65,15 +65,15 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
<rect x={71.28} y={79.489} width={62.331} height={41.047} rx={4} fill="#fff" />
<path
d="M86.814 87.743l-9.453 24.446a.5.5 0 00.467.68h48.274c.531 0 .696-.717.218-.949l-22.462-10.917a.507.507 0 00-.309-.042l-10.66 1.966a.5.5 0 01-.569-.344l-4.562-14.807a.5.5 0 00-.944-.033z"
fill="url(#prefix__paint6_linear)"
fill="url(#empty_prefix_paint6_linear)"
/>
</g>
<path d="M0 192.568c118.691-46.234 184.527-45.657 300 0H0z" fill="url(#prefix__paint7_linear)" />
<path d="M0 192.568c118.691-46.234 184.527-45.657 300 0H0z" fill="url(#empty_prefix_paint7_linear)" />
<path
fillRule="evenodd"
clipRule="evenodd"
d="M93.055 141.417a13.717 13.717 0 007.356-12.157c0-7.577-6.142-13.719-13.72-13.719-7.576 0-13.718 6.142-13.718 13.719 0 6.712 4.82 12.299 11.19 13.486-1.605 4.88-3.424 9.491-5.036 13.578-2.574 6.525-4.62 11.713-4.426 14.522.41 5.939 20.306 5.008 25.247 0 3.817-3.869-.706-17.07-6.893-29.429z"
fill="url(#prefix__paint8_linear)"
fill="url(#empty_prefix_paint8_linear)"
/>
<circle cx={241.216} cy={14.189} r={14.189} fill="#88A6FF" />
<rect x={231.756} y={12.612} width={18.919} height={3.153} rx={1.577} fill="#fff" />
Expand All @@ -97,7 +97,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
/>
<defs>
<linearGradient
id="prefix__paint0_linear"
id="empty_prefix_paint0_linear"
x1={149.882}
y1={174.231}
x2={149.882}
Expand All @@ -108,7 +108,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
<stop offset={1} stopColor="#F7F8FC" />
</linearGradient>
<linearGradient
id="prefix__paint1_linear"
id="empty_prefix_paint1_linear"
x1={127.023}
y1={38.441}
x2={98.645}
Expand All @@ -119,7 +119,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
<stop offset={1} stopColor="#B8D1FF" />
</linearGradient>
<linearGradient
id="prefix__paint2_linear"
id="empty_prefix_paint2_linear"
x1={109.794}
y1={46.043}
x2={87.496}
Expand All @@ -130,7 +130,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
<stop offset={1} stopColor="#B8D1FF" />
</linearGradient>
<linearGradient
id="prefix__paint3_linear"
id="empty_prefix_paint3_linear"
x1={126.01}
y1={53.644}
x2={111.821}
Expand All @@ -141,7 +141,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
<stop offset={1} stopColor="#B8D1FF" />
</linearGradient>
<linearGradient
id="prefix__paint4_linear"
id="empty_prefix_paint4_linear"
x1={146.28}
y1={46.043}
x2={122.969}
Expand All @@ -152,7 +152,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
<stop offset={1} stopColor="#B8D1FF" />
</linearGradient>
<linearGradient
id="prefix__paint5_linear"
id="empty_prefix_paint5_linear"
x1={140.769}
y1={95.77}
x2={207.115}
Expand All @@ -163,7 +163,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
<stop offset={1} stopColor="#B8D1FF" stopOpacity={0.9} />
</linearGradient>
<linearGradient
id="prefix__paint6_linear"
id="empty_prefix_paint6_linear"
x1={102.687}
y1={86.399}
x2={102.687}
Expand All @@ -174,7 +174,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
<stop offset={1} stopColor="#B8D1FF" />
</linearGradient>
<linearGradient
id="prefix__paint7_linear"
id="empty_prefix_paint7_linear"
x1={151.21}
y1={158.113}
x2={151.21}
Expand All @@ -186,7 +186,7 @@ const EmptyImage = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGElemen
<stop offset={1} stopColor="#fff" />
</linearGradient>
<linearGradient
id="prefix__paint8_linear"
id="empty_prefix_paint8_linear"
x1={107.307}
y1={115.385}
x2={72.692}
Expand Down
Loading

1 comment on commit f1fad4f

@vercel
Copy link

@vercel vercel bot commented on f1fad4f Mar 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.