Add theming tab
parent
a9309e3b08
commit
9c03b03b99
|
@ -13,7 +13,7 @@
|
|||
background-color: transparent;
|
||||
border: 0 none;
|
||||
display: block;
|
||||
padding: 1rem 0;
|
||||
padding: 1rem 2rem;
|
||||
min-width: 12rem;
|
||||
text-align: center;
|
||||
color: var(--text-color-secondary);
|
||||
|
|
|
@ -12,8 +12,11 @@
|
|||
<li :class="{ 'doc-tabmenu-active': tab === 1 }">
|
||||
<button type="button" @click="tab = 1">API</button>
|
||||
</li>
|
||||
<li v-if="ptTabComponent" :class="{ 'doc-tabmenu-active': tab === 2 }">
|
||||
<button type="button" @click="tab = 2">PASS THROUGH</button>
|
||||
<li :class="{ 'doc-tabmenu-active': tab === 2 }">
|
||||
<button type="button" @click="tab = 2">THEMING</button>
|
||||
</li>
|
||||
<li v-if="ptTabComponent" :class="{ 'doc-tabmenu-active': tab === 3 }">
|
||||
<button type="button" @click="tab = 3">PASS THROUGH</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -34,6 +37,10 @@
|
|||
</div>
|
||||
|
||||
<div v-if="tab === 2" class="doc-tabpanel">
|
||||
<component :is="{ ...themingDocs }" />
|
||||
</div>
|
||||
|
||||
<div v-if="tab === 3" class="doc-tabpanel">
|
||||
<component :is="{ ...ptTabComponent }" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -42,14 +49,14 @@
|
|||
|
||||
<script>
|
||||
export default {
|
||||
props: ['title', 'header', 'description', 'componentDocs', 'apiDocs', 'className', 'ptTabComponent'],
|
||||
props: ['title', 'header', 'description', 'componentDocs', 'apiDocs', 'className', 'ptTabComponent', 'themingDocs'],
|
||||
data() {
|
||||
return {
|
||||
tab: 0
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.tab = this.$route.hash.includes('api') ? 1 : this.$route.hash.includes('pt') ? 2 : 0;
|
||||
this.tab = this.$route.hash.includes('api') ? 1 : this.$route.hash.includes('pt') ? 3 : 0;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<DocSectionText id="style" label="Style" v-bind="$attrs">
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>Following is the list of structural style classes, for theming classes visit <PrimeVueNuxtLink to="/theming">theming</PrimeVueNuxtLink> page.</p>
|
||||
</DocSectionText>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>Theming is implemented with the pass through properties in unstyled mode. Example below demonstrates the built-in Tailwind theme.</p>
|
||||
</DocSectionText>
|
||||
</template>
|
|
@ -0,0 +1,33 @@
|
|||
<template>
|
||||
<div class="doc-main">
|
||||
<div class="doc-intro">
|
||||
<h1>Checkbox Theming</h1>
|
||||
</div>
|
||||
<DocSections :docs="docs" />
|
||||
</div>
|
||||
<DocSectionNav :docs="docs" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import StyledDoc from './StyledDoc.vue';
|
||||
import UnstyledDoc from './UnstyledDoc.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
docs: [
|
||||
{
|
||||
id: 'styled',
|
||||
label: 'Styled',
|
||||
component: StyledDoc
|
||||
},
|
||||
{
|
||||
id: 'unstyled',
|
||||
label: 'Unstyled',
|
||||
component: UnstyledDoc
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -1,5 +1,13 @@
|
|||
<template>
|
||||
<DocComponent title="Vue Checkbox Component" header="Checkbox" description="Checkbox is an extension to standard checkbox element with theming." :componentDocs="docs" :apiDocs="['Checkbox']" :ptTabComponent="ptComponent" />
|
||||
<DocComponent
|
||||
title="Vue Checkbox Component"
|
||||
header="Checkbox"
|
||||
description="Checkbox is an extension to standard checkbox element with theming."
|
||||
:componentDocs="docs"
|
||||
:apiDocs="['Checkbox']"
|
||||
:ptTabComponent="ptComponent"
|
||||
:themingDocs="themingDoc"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -10,9 +18,9 @@ import DynamicDoc from '@/doc/checkbox/DynamicDoc';
|
|||
import GroupDoc from '@/doc/checkbox/GroupDoc';
|
||||
import ImportDoc from '@/doc/checkbox/ImportDoc';
|
||||
import InvalidDoc from '@/doc/checkbox/InvalidDoc';
|
||||
import StyleDoc from '@/doc/checkbox/StyleDoc';
|
||||
import VeeValidateDoc from '@/doc/checkbox/form/VeeValidateDoc';
|
||||
import PTComponent from '@/doc/checkbox/pt/index.vue';
|
||||
import ThemingDoc from '@/doc/checkbox/theming/index.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -60,18 +68,14 @@ export default {
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'style',
|
||||
label: 'Style',
|
||||
component: StyleDoc
|
||||
},
|
||||
{
|
||||
id: 'accessibility',
|
||||
label: 'Accessibility',
|
||||
component: AccessibilityDoc
|
||||
}
|
||||
],
|
||||
ptComponent: PTComponent
|
||||
ptComponent: PTComponent,
|
||||
themingDoc: ThemingDoc
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue