diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-22 15:08:37 +0300 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-22 15:08:37 +0300 |
| commit | fcc2f4704e39b0e69b377cc138f75027721dac22 (patch) | |
| tree | 732fc94b354a26c08fba9cc9059f9c6c900182be /src/components/common/SocialShare.astro | |
Initial template
Diffstat (limited to 'src/components/common/SocialShare.astro')
| -rw-r--r-- | src/components/common/SocialShare.astro | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/components/common/SocialShare.astro b/src/components/common/SocialShare.astro new file mode 100644 index 0000000..d035e8f --- /dev/null +++ b/src/components/common/SocialShare.astro @@ -0,0 +1,65 @@ +--- +import { Icon } from 'astro-icon/components'; + +export interface Props { + text: string; + url: string | URL; + class?: string; +} + +const { text, url, class: className = 'inline-block' } = Astro.props; +--- + +<div class={className}> + <span class="align-super font-bold text-slate-500 dark:text-slate-400">Share:</span> + <button + class="ml-2 rtl:ml-0 rtl:mr-2" + title="Twitter Share" + data-aw-social-share="twitter" + data-aw-url={url} + data-aw-text={text} + ><Icon + name="tabler:brand-x" + class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300" + /> + </button> + <button class="ml-2 rtl:ml-0 rtl:mr-2" title="Facebook Share" data-aw-social-share="facebook" data-aw-url={url} + ><Icon + name="tabler:brand-facebook" + class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300" + /> + </button> + <button + class="ml-2 rtl:ml-0 rtl:mr-2" + title="Linkedin Share" + data-aw-social-share="linkedin" + data-aw-url={url} + data-aw-text={text} + ><Icon + name="tabler:brand-linkedin" + class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300" + /> + </button> + <button + class="ml-2 rtl:ml-0 rtl:mr-2" + title="Whatsapp Share" + data-aw-social-share="whatsapp" + data-aw-url={url} + data-aw-text={text} + ><Icon + name="tabler:brand-whatsapp" + class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300" + /> + </button> + <button + class="ml-2 rtl:ml-0 rtl:mr-2" + title="Email Share" + data-aw-social-share="mail" + data-aw-url={url} + data-aw-text={text} + ><Icon + name="tabler:mail" + class="w-6 h-6 text-gray-400 dark:text-slate-500 hover:text-black dark:hover:text-slate-300" + /> + </button> +</div> |
