From b6795ea37b63b5b99c1c6b760905c12d722b550f Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Mon, 29 May 2023 13:01:22 +0200 Subject: [PATCH] refactor: allow to turn of email icon --- src/components/EmailLink.astro | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/components/EmailLink.astro b/src/components/EmailLink.astro index a9bd7dc..775715e 100644 --- a/src/components/EmailLink.astro +++ b/src/components/EmailLink.astro @@ -4,23 +4,26 @@ import { Sprite } from 'astro-icon'; import { TextLink } from '../components'; export interface Props { + icon?: boolean; text?: string; } -const { text = 'Email', ...props } = Astro.props; +const { text = 'Email', icon = true, ...props } = Astro.props; --- {text} - - + { + icon && ( + + + ) + }