PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.7.1
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.7.1
1.7.2 1.7.1 1.7.0 1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 trunk 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6
hostinger-reach / frontend / vue / components / Tabs.vue
hostinger-reach / frontend / vue / components Last commit date
Modals 1 month ago skeletons 5 months ago ActionButton.vue 5 months ago ActionButtonsSection.vue 5 months ago Banner.vue 3 months ago FAQ.vue 5 months ago FormItem.vue 2 months ago FormsSection.vue 11 months ago Hero.vue 1 month ago Integrations.vue 4 months ago Pagination.vue 10 months ago PluginEntriesTable.vue 4 months ago PluginEntry.vue 5 months ago PluginExpansion.vue 8 months ago ReachContactsSummary.vue 2 weeks ago SyncStatusLabel.vue 6 months ago Tabs.vue 9 months ago Toggle.vue 10 months ago UsageCard.vue 10 months ago UsageCardsRow.vue 1 year ago UsageCardsSection.vue 1 year ago WooCommerce.vue 2 weeks ago WooCommerceEntriesTable.vue 4 months ago
Tabs.vue
66 lines
1 <script setup lang="ts">
2 import { computed } from 'vue';
3 import { useRoute, useRouter } from 'vue-router';
4
5 import type { Tab } from '@/data/tabs';
6
7 type TabsProps = {
8 tabs: Tab[];
9 defaultTab: string;
10 };
11
12 const props = defineProps<TabsProps>();
13
14 const route = useRoute();
15 const router = useRouter();
16
17 const activeKey = computed(() => route.hash?.replace('#', '') || props.defaultTab);
18
19 const isActive = (key: string): boolean => activeKey.value === key;
20
21 const setTab = (key: string): void => {
22 router.push({ path: route.path, hash: `#${key}` });
23 };
24 </script>
25
26 <template>
27 <div class="integration-tabs" role="tablist">
28 <button
29 v-for="tab in props.tabs"
30 :key="tab.key"
31 class="integration-tabs__tab"
32 :class="{ 'is-active': isActive(tab.key) }"
33 role="tab"
34 @click="() => setTab(tab.key)"
35 >
36 {{ tab.label }}
37 </button>
38 </div>
39 </template>
40
41 <style scoped lang="scss">
42 .integration-tabs {
43 display: flex;
44 gap: 16px;
45 width: 100%;
46 }
47
48 .integration-tabs__tab {
49 border: 1px solid var(--neutral--200);
50 background: var(--neutral--0);
51 color: var(--neutral--500);
52 border-radius: 24px;
53 padding: 4px 16px;
54 font-weight: bold;
55 font-size: 14px;
56 line-height: 20px;
57 cursor: pointer;
58 }
59
60 .integration-tabs__tab.is-active {
61 background: var(--neutral--500);
62 color: var(--neutral--0);
63 font-weight: normal;
64 }
65 </style>
66