Merge pull request #29 from rotary-dev-fellowship/refactor/brandlogo-props
Refactor: Simplify BrandLogo Component Props Handling
This commit is contained in:
commit
9566b4403f
3 changed files with 7 additions and 11 deletions
|
|
@ -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 |
|
|
@ -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 -->
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue