From ea7eec99f860c55b5c2bd7793db23daa23297386 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 4 Sep 2023 11:34:23 +0100 Subject: [PATCH] post actions fixes --- src/components/layouts/Post/Action.astro | 6 ++++-- src/components/layouts/Post/Actions.astro | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/layouts/Post/Action.astro b/src/components/layouts/Post/Action.astro index 35fa057e..122fd14f 100644 --- a/src/components/layouts/Post/Action.astro +++ b/src/components/layouts/Post/Action.astro @@ -6,7 +6,8 @@ type Props = { url?: string } -const { title, text, url } = Astro.props +const { title, text, url, icon } = Astro.props +const Icon = icon --- - {/* */} +

{title}

{text}

diff --git a/src/components/layouts/Post/Actions.astro b/src/components/layouts/Post/Actions.astro index 0c457934..3cacf03c 100644 --- a/src/components/layouts/Post/Actions.astro +++ b/src/components/layouts/Post/Actions.astro @@ -2,6 +2,7 @@ import config from '@config/blog.config.mjs' import styles from './Actions.module.css' import Action from './Action.astro' +import { Mastodon, Bitcoin, Github } from '@images/icons' const githubLink = '?' @@ -10,19 +11,19 @@ const actions = [ title: 'Have a comment?', text: 'Hit me up @krema@mas.to', url: config.author.mastodon, - icon: 'Mastodon' + icon: Mastodon }, { title: 'Found something useful?', text: 'Say thanks with BTC or ETH', url: '/thanks', - icon: 'Bitcoin' + icon: Bitcoin }, { title: 'Edit on GitHub', text: 'Contribute to this post', url: githubLink, - icon: 'GitHub' + icon: Github } ] ---