feat(header, download-icon): enhance download icon with customizable stroke width

This commit is contained in:
taroj1205 2024-11-11 22:25:30 +13:00
parent 44bae0a5db
commit a722f6719b
2 changed files with 6 additions and 3 deletions

View file

@ -9,7 +9,9 @@ import Navbar from "./navbar.astro";
<Navbar /> <Navbar />
<section> <section>
<LanguageIcon class="dark:text-secondary-dark h-7 w-7 text-secondary" /> <LanguageIcon class="dark:text-secondary-dark h-7 w-7 text-secondary" />
<Download class="py-2 font-semibold"><DownloadIcon />v1.0.1-a.17</Download> <Download class="py-2 font-semibold"
><DownloadIcon strokeWidth="2.5" />v1.0.1-a.17</Download
>
</section> </section>
</header> </header>

View file

@ -1,15 +1,16 @@
--- ---
import { ny } from "../../lib/utils"; import { ny } from "../../lib/utils";
const { class: className } = Astro.props; const { class: className, strokeWidth = "1.5", ...props } = Astro.props;
--- ---
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
fill="none" fill="none"
viewBox="0 0 24 24" viewBox="0 0 24 24"
stroke-width="1.5" stroke-width={strokeWidth}
stroke="currentColor" stroke="currentColor"
class={ny("w-5 h-5", className)} class={ny("w-5 h-5", className)}
{...props}
> >
<path <path
stroke-linecap="round" stroke-linecap="round"