forked from learningequality/kolibri-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tabs.vue
54 lines (46 loc) · 1.44 KB
/
tabs.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<template>
<DocsPageTemplate>
<DocsPageSection title="Overview" anchor="#overview">
<p>Tabs are a design pattern describing a set of tab elements and panels containing content associated with them. Only one panel, the one corresponding to the active tab, is displayed at a time.</p>
<DocsShow>
<KTabs
tabsId="coachReportsTabs"
ariaLabel="Coach reports"
:tabs="tabs"
>
<template #tabLessons>
Lessons tab content
</template>
<template #tabLearners>
Learners tab content
</template>
<template #tabGroups>
Groups tab content
</template>
</KTabs>
</DocsShow>
<p>They can be implemented by means of the following components:</p>
<ul>
<li>
<DocsLibraryLink component="KTabs" /> is the simplest and recommended way to implement tabs
</li>
<li>
Using <DocsLibraryLink component="KTabsList" /> together with <DocsLibraryLink component="KTabsPanel" /> is an alternative for more complex scenarios
</li>
</ul>
</DocsPageSection>
</DocsPageTemplate>
</template>
<script>
export default {
data() {
return {
tabs: [
{ id: 'tabLessons', label: 'Lessons' },
{ id: 'tabLearners', label: 'Learners' },
{ id: 'tabGroups', label: 'Groups' },
],
};
},
};
</script>