From 8dd3d3ce91022e2340dcb5a36b6abce64f5e89bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Teles?= Date: Fri, 12 Jul 2024 07:37:47 -0300 Subject: [PATCH] refactor: Update Icons.astro to include default fill for icons The commit updates the Icons.astro file to include a default fill for icons. Previously, the fill color was only applied if the className did not include "fill-". Now, a default fill of "fill-slate-600" is added if the className does not already include a fill color. This change ensures consistent styling for icons and improves the maintainability of the codebase. --- src/components/Icons.astro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Icons.astro b/src/components/Icons.astro index cbad48c..8a21c02 100644 --- a/src/components/Icons.astro +++ b/src/components/Icons.astro @@ -5,7 +5,8 @@ type Props = { }; const { icon, className = "" } = Astro.props; -const completeClassName = `text-[inherit] w-[1em] mx-2 fill-slate-600 ${className}`; +const defaultFill = className.includes("fill-") ? "" : "fill-slate-600"; +const completeClassName = `text-[inherit] w-[1em] mx-2 ${defaultFill} ${className}`; --- {