Chip pt demo added

pull/3892/head
Tuğçe Küçükoğlu 2023-04-21 16:24:46 +03:00
parent b228f30c52
commit 3454c20f50
4 changed files with 110 additions and 2 deletions

56
doc/chip/pt/PTDoc.vue Normal file
View File

@ -0,0 +1,56 @@
<template>
<DocSectionText v-bind="$attrs"> </DocSectionText>
<div class="card flex justify-content-center">
<Chip
label="Amy Elsner"
image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png"
:pt="{
root: { style: { background: 'linear-gradient(to right, #8e2de2, #4a00e0)', borderRadius: '24px' } },
label: { class: 'text-white' }
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
<Chip
label="Amy Elsner"
image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png"
:pt="{
root: { style: { background: 'linear-gradient(to right, #8e2de2, #4a00e0)', borderRadius: '24px' } },
label: { class: 'text-white' }
}"
/>`,
options: `
<template>
<Chip
label="Amy Elsner"
image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png"
:pt="{
root: { style: { background: 'linear-gradient(to right, #8e2de2, #4a00e0)', borderRadius: '24px' } },
label: { class: 'text-white' }
}"
/>
</template>`,
composition: `
<template>
<Chip
label="Amy Elsner"
image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png"
:pt="{
root: { style: { background: 'linear-gradient(to right, #8e2de2, #4a00e0)', borderRadius: '24px' } },
label: { class: 'text-white' }
}"
/>
</template>`
}
};
}
};
</script>

8
doc/chip/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/chip.jpg" />
</div>
</template>

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

@ -0,0 +1,42 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>Chip 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.chip',
label: 'Chip PT Options',
component: DocApiTable,
data: getPTOption('Chip')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,5 +1,5 @@
<template> <template>
<DocComponent title="Vue Chip Component" header="Chip" description="Chip represents entities using icons, labels and images." :componentDocs="docs" :apiDocs="['Chip']" /> <DocComponent title="Vue Chip Component" header="Chip" description="Chip represents entities using icons, labels and images." :componentDocs="docs" :apiDocs="['Chip']" :ptTabComponent="ptComponent" />
</template> </template>
<script> <script>
@ -10,6 +10,7 @@ import ImageDoc from '@/doc/chip/ImageDoc';
import ImportDoc from '@/doc/chip/ImportDoc'; import ImportDoc from '@/doc/chip/ImportDoc';
import StyleDoc from '@/doc/chip/StyleDoc'; import StyleDoc from '@/doc/chip/StyleDoc';
import TemplateDoc from '@/doc/chip/TemplateDoc'; import TemplateDoc from '@/doc/chip/TemplateDoc';
import PTComponent from '@/doc/chip/pt/index.vue';
export default { export default {
data() { data() {
@ -50,7 +51,8 @@ export default {
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
] ],
ptComponent: PTComponent
}; };
} }
}; };