Avatar pt demo added

pull/3892/head
Tuğçe Küçükoğlu 2023-04-21 15:05:15 +03:00
parent 6e0ccd732e
commit a71d3810e1
4 changed files with 101 additions and 2 deletions

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

@ -0,0 +1,40 @@
<template>
<DocSectionText v-bind="$attrs"> </DocSectionText>
<div class="card flex justify-content-center">
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" :pt="{ image: { class: 'w-4rem h-4rem' } }" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png"
:pt="{
image: { class: 'w-4rem h-4rem' }
}"
/>`,
options: `
<template>
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png"
:pt="{
image: { class: 'w-4rem h-4rem' }
}"
/>
</template>`,
composition: `
<template>
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png"
:pt="{
image: { class: 'w-4rem h-4rem' }
}"
/>
</template>`
}
};
}
};
</script>

View File

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

48
doc/avatar/pt/index.vue Normal file
View File

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

View File

@ -1,5 +1,5 @@
<template> <template>
<DocComponent title="Vue Avatar Component" header="Avatar" description="Avatar represents people using icons, labels and images." :componentDocs="docs" :apiDocs="['Avatar', 'AvatarGroup']" /> <DocComponent title="Vue Avatar Component" header="Avatar" description="Avatar represents people using icons, labels and images." :componentDocs="docs" :apiDocs="['Avatar', 'AvatarGroup']" :ptTabComponent="ptComponent" />
</template> </template>
<script> <script>
@ -11,6 +11,7 @@ import ImportDoc from '@/doc/avatar/ImportDoc';
import LabelDoc from '@/doc/avatar/LabelDoc'; import LabelDoc from '@/doc/avatar/LabelDoc';
import StylingAvatarDoc from '@/doc/avatar/StylingAvatarDoc'; import StylingAvatarDoc from '@/doc/avatar/StylingAvatarDoc';
import StylingAvatarGroupDoc from '@/doc/avatar/StylingAvatarGroupDoc'; import StylingAvatarGroupDoc from '@/doc/avatar/StylingAvatarGroupDoc';
import PTComponent from '@/doc/avatar/pt/index.vue';
export default { export default {
data() { data() {
@ -56,7 +57,8 @@ export default {
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
] ],
ptComponent: PTComponent
}; };
} }
}; };