From 368a6fa26c2d2a075fe5f9203b4bd58534085ffe Mon Sep 17 00:00:00 2001 From: Ewelina Date: Thu, 20 Oct 2022 09:59:17 +0200 Subject: [PATCH] Create social media button (#15) Co-authored-by: Konrad Szwarc Co-authored-by: hoolek77 --- src/components/atoms/icon-button.astro | 40 ++++++++++++++++++++++++++ src/pages/playground/icon-button.astro | 10 +++++++ 2 files changed, 50 insertions(+) create mode 100644 src/components/atoms/icon-button.astro create mode 100644 src/pages/playground/icon-button.astro diff --git a/src/components/atoms/icon-button.astro b/src/components/atoms/icon-button.astro new file mode 100644 index 0000000..df5b3ef --- /dev/null +++ b/src/components/atoms/icon-button.astro @@ -0,0 +1,40 @@ +--- +import Icon from './icon'; + +type IconButtonSize = 'small' | 'large'; + +export interface Props extends astroHTML.JSX.AnchorHTMLAttributes { + icon: string; + name: string; + size: IconButtonSize; +} + +const sizeMap: Record = { + small: 'w-7 h-7', + large: 'w-9 h-9', +}; + +const { icon, name, size, ...props } = Astro.props; +--- + + + + diff --git a/src/pages/playground/icon-button.astro b/src/pages/playground/icon-button.astro new file mode 100644 index 0000000..ce27ef3 --- /dev/null +++ b/src/pages/playground/icon-button.astro @@ -0,0 +1,10 @@ +--- +import IconButton from '@/atoms/icon-button.astro'; +--- + +
+ + + + +