Merge pull request #29 from rotary-dev-fellowship/refactor/brandlogo-props

Refactor: Simplify BrandLogo Component Props Handling
This commit is contained in:
Emil Gulamov 2024-03-30 03:45:40 +04:00 committed by GitHub
commit 9566b4403f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 11 deletions

View file

@ -1,12 +1,8 @@
--- <svg
const { width } = Astro.props; {...Astro.props}
viewBox="0 0 521 226"
interface Props { fill="none"
width: string; >
}
---
<svg class=`h-auto ${width}` viewBox="0 0 521 226" fill="none">
<rect <rect
width="78.937" width="78.937"
height="18.485" height="18.485"

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

@ -25,7 +25,7 @@ const crafted: string = Astro.currentLocale === "fr" ? "Fabriqué par" : "Crafte
<div class="grid grid-cols-2 gap-6 md:grid-cols-4 lg:grid-cols-5"> <div class="grid grid-cols-2 gap-6 md:grid-cols-4 lg:grid-cols-5">
<div class="col-span-full lg:col-span-1"> <div class="col-span-full lg:col-span-1">
<!-- Brand Logo --> <!-- Brand Logo -->
<BrandLogo width="w-32" /> <BrandLogo class="h-auto w-32" />
</div> </div>
<!-- An array of links for Product and Company sections --> <!-- An array of links for Product and Company sections -->
{ {

View file

@ -29,7 +29,7 @@ const homeUrl = Astro.currentLocale === "fr" ? "/fr" : "/";
href={homeUrl} href={homeUrl}
aria-label="Brand" aria-label="Brand"
> >
<BrandLogo width="w-24" /> <BrandLogo class="h-auto w-24" />
</a> </a>
<!-- Collapse toggle for smaller screens --> <!-- Collapse toggle for smaller screens -->
<div class="ml-auto mr-5 md:hidden"> <div class="ml-auto mr-5 md:hidden">