From 7565f34b16e36e2d47b280449f6e69d100523818 Mon Sep 17 00:00:00 2001 From: KazooTTT Date: Sat, 23 Nov 2024 16:22:01 +0800 Subject: [PATCH] feat: revert icon --- src/components/ToolSection.astro | 79 ++++++-------------------------- 1 file changed, 15 insertions(+), 64 deletions(-) diff --git a/src/components/ToolSection.astro b/src/components/ToolSection.astro index 0a41a7f..c287a2a 100644 --- a/src/components/ToolSection.astro +++ b/src/components/ToolSection.astro @@ -10,31 +10,10 @@ interface Props { description: string href?: string iconPath?: string - iconBgColour?: string - customIcon?: string + iconBgColour: string }[] } - const { class: className, title, tools, ...props } = Astro.props - -const DefaultIcon = `
- - - -
` - -const IconComponent = (iconPath: string) => { - // If it's a local SVG icon (doesn't start with a namespace like 'ph:') - if (!iconPath.includes(':')) { - return `
- -
` - } - // For icon component icons (like Phosphor icons) - return `
- -
` -} ---
{
{ tools.map((tool) => ( -
- {tool.href ? ( - -
-
- {tool.customIcon ? ( -
- ) : tool.iconPath ? ( -
- ) : ( -
- )} -
-

{tool.name}

-

{tool.description}

-
-
-
- ) : ( -
-
- {tool.customIcon ? ( -
- ) : tool.iconPath ? ( -
- ) : ( -
- )} -
-

{tool.name}

-

{tool.description}

-
+ +
+
+ +
+

{tool.name}

+

{tool.description}

- )} -
+
+
)) }