Add basic Social Share buttons
This commit is contained in:
21
src/components/atoms/SocialShare.astro
Normal file
21
src/components/atoms/SocialShare.astro
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
import { Icon } from 'astro-icon';
|
||||
const { text, url, class: className = "inline-block" } = Astro.props;
|
||||
---
|
||||
|
||||
<div class={className}>
|
||||
<span class="align-super font-bold">Share:</span>
|
||||
<button class="ml-2" data-aw-social-share="facebook" data-aw-url={url}><Icon name="logos:facebook" class="w-6 h-6" /></button>
|
||||
<button class="ml-2" data-aw-social-share="twitter" data-aw-url={url} data-aw-text={text}
|
||||
><Icon name="logos:twitter" class="w-6 h-6" />
|
||||
</button>
|
||||
<button class="ml-2" data-aw-social-share="linkedin" data-aw-url={url} data-aw-text={text}
|
||||
><Icon name="logos:linkedin-icon" class="w-6 h-6" />
|
||||
</button>
|
||||
<button class="ml-2" data-aw-social-share="whatsapp" data-aw-url={url} data-aw-text={text}
|
||||
><Icon name="logos:whatsapp" class="w-6 h-6" />
|
||||
</button>
|
||||
<button class="ml-2" data-aw-social-share="mail" data-aw-url={url} data-aw-text={text}
|
||||
><Icon name="tabler:mail" class="w-6 h-6" />
|
||||
</button>
|
||||
</div>
|
Reference in New Issue
Block a user