Skip to content

Commit

Permalink
feat(section): Add SocialSection
Browse files Browse the repository at this point in the history
  • Loading branch information
bonbisu committed Aug 8, 2022
1 parent 7824d0d commit e4e946e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/components/Atoms/SocialIcon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script setup lang="ts">
interface Props {
label?: string
icon?: string
routeTo?: string
}
const props = withDefaults(defineProps<Props>(), {
icon: 'i-clarity:tree-solid',
routeTo: '/',
})
const go = (route = '') => {
window.open(route, '_blank')
}
</script>

<template>
<div class="cursor-pointer" @click="go(routeTo)">
<slot>
<div class="text-3xl m-auto" :class="icon" />
</slot>
<p class="pt-2">
{{ props.label }}
</p>
</div>
</template>
8 changes: 8 additions & 0 deletions src/components/Organisms/Sections/SocialSection.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div class="h-[50vh] flex items-center justify-center space-x-20">
<SocialIcon label="Discord" icon="i-fa-brands-discord" route-to="https://discord.gg/2ZchhEPA7K" />
<SocialIcon label="Telegram" icon="i-fa-brands-telegram" route-to="https://t.co/w4MUungCn7" />
<SocialIcon label="Twitter" icon="i-fa-brands-twitter" route-to="https://twitter.com/agroforestDAO" />
</div>
</template>
<!-- -->

0 comments on commit e4e946e

Please sign in to comment.