fix(dashboard): use svg component instead of static png for logo (#9281)

This commit is contained in:
Frane Polić
2024-10-01 10:34:50 +02:00
committed by GitHub
parent 9e299cf130
commit 0e35e312e5
2 changed files with 39 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -6,7 +6,7 @@ export default function AvatarBox({ checked }: { checked?: boolean }) {
return (
<IconAvatar
size="xlarge"
className="bg-ui-button-neutral shadow-buttons-neutral after:button-neutral-gradient relative mb-4 flex size-14 items-center justify-center rounded-xl after:inset-0 after:content-['']"
className="bg-ui-button-neutral shadow-buttons-neutral after:button-neutral-gradient relative mb-4 flex items-center justify-center rounded-xl after:inset-0 after:content-[''] w-[52px] h-[52px]"
>
{checked && (
<motion.div
@@ -44,8 +44,44 @@ export default function AvatarBox({ checked }: { checked?: boolean }) {
</svg>
</motion.div>
)}
<img width={44} height={44} src="/medusa-avatar.png" />
<svg
className="rounded-[10px]"
viewBox="0 0 400 400"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="400" height="400" fill="#18181B" />
<path
d="M238.088 51.1218L238.089 51.1223L310.605 92.8101C334.028 106.308 348.526 131.32 347.868 157.953L347.867 157.966V157.978V241.688C347.867 268.68 333.687 293.362 310.271 306.856L310.269 306.858L237.754 348.878C214.336 362.374 185.643 362.374 162.225 348.878L89.7127 306.859C66.6206 293.361 52.1113 268.674 52.1113 241.688V157.978C52.1113 131.326 66.6211 106.307 89.7088 92.8093C89.7101 92.8085 89.7114 92.8078 89.7127 92.807L162.556 51.1233L162.559 51.1218C185.977 37.6261 214.67 37.6261 238.088 51.1218ZM124.634 200C124.634 241.576 158.502 275.372 200.156 275.372C242.142 275.372 276.013 241.578 276.013 200C276.013 158.419 241.805 124.628 200.156 124.628C158.502 124.628 124.634 158.424 124.634 200Z"
fill="url(#paint0_linear_11869_12671)"
stroke="url(#paint1_linear_11869_12671)"
strokeWidth="2"
/>
<defs>
<linearGradient
id="paint0_linear_11869_12671"
x1="200"
y1="40"
x2="200"
y2="360"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="white" />
<stop offset="1" stopColor="white" stopOpacity="0.7" />
</linearGradient>
<linearGradient
id="paint1_linear_11869_12671"
x1="200"
y1="40"
x2="200"
y2="360"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="white" stopOpacity="0" />
<stop offset="1" stopColor="white" stopOpacity="0.7" />
</linearGradient>
</defs>
</svg>
</IconAvatar>
)
}