Badge pt demo added

pull/3892/head
Tuğçe Küçükoğlu 2023-04-21 16:22:26 +03:00
parent 3d6847aea6
commit ebe86df393
4 changed files with 94 additions and 2 deletions

40
doc/badge/pt/PTDoc.vue Normal file
View File

@ -0,0 +1,40 @@
<template>
<DocSectionText v-bind="$attrs"> </DocSectionText>
<div class="card flex justify-content-center">
<Badge value="2" :pt="{ root: { class: 'bg-primary border-round-sm' } }" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
<Badge value="2"
:pt="{
root: { class: 'bg-primary border-round-sm' }
}"
/>`,
options: `
<template>
<Badge value="2"
:pt="{
root: { class: 'bg-primary border-round-sm' }
}"
/>
</template>`,
composition: `
<template>
<Badge value="2"
:pt="{
root: { class: 'bg-primary border-round-sm' }
}"
/>
</template>`
}
};
}
};
</script>

8
doc/badge/pt/PTImage.vue Normal file
View File

@ -0,0 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div>
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/badge.jpg" />
</div>
</template>

42
doc/badge/pt/index.vue Normal file
View File

@ -0,0 +1,42 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>Badge Pass Through</h1>
<p>Description</p>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
import PtDoc from './PTDoc.vue';
import PTImage from './PTImage.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'WireFrame',
component: PTImage
},
{
id: 'pt.doc.badge',
label: 'Badge PT Options',
component: DocApiTable,
data: getPTOption('Badge')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,5 +1,5 @@
<template>
<DocComponent title="Vue Badge Component" header="Badge" description="Badge is a small status indicator for another element." :componentDocs="docs" :apiDocs="['Badge', 'BadgeDirective']" />
<DocComponent title="Vue Badge Component" header="Badge" description="Badge is a small status indicator for another element." :componentDocs="docs" :apiDocs="['Badge', 'BadgeDirective']" :ptTabComponent="ptComponent" />
</template>
<script>
@ -11,6 +11,7 @@ import PositionDoc from '@/doc/badge/PositionDoc.vue';
import SeverityDoc from '@/doc/badge/SeverityDoc.vue';
import SizeDoc from '@/doc/badge/SizeDoc.vue';
import StyleDoc from '@/doc/badge/StyleDoc.vue';
import PTComponent from '@/doc/badge/pt/index.vue';
export default {
data() {
@ -56,7 +57,8 @@ export default {
label: 'Accessibility',
component: AccessibilityDoc
}
]
],
ptComponent: PTComponent
};
}
};