Skip to content

Commit

Permalink
First pt viewer demo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Sep 13, 2024
1 parent c6dcd27 commit ea59ca3
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 18 deletions.
41 changes: 35 additions & 6 deletions apps/showcase/doc/datatable/pt/PTImage.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,37 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
</div>
<DocSectionText v-bind="$attrs" />
<DocPTViewer :docs="docs">
<DataTable :value="products" tableStyle="min-width: 50rem">
<Column field="code" header="Code"></Column>
<Column field="name" header="Name"></Column>
<Column field="category" header="Category"></Column>
<Column field="quantity" header="Quantity"></Column>
</DataTable>
</DocPTViewer>
</template>

<script>
import { getPTOptions } from '@/components/doc/helpers';
import { ProductService } from '@/service/ProductService';
export default {
data() {
return {
products: null,
docs: [
{
data: getPTOptions('DataTable'),
key: 'DataTable'
},
{
data: getPTOptions('Column'),
key: 'Column'
}
]
};
},
mounted() {
ProductService.getProductsMini().then((data) => (this.products = data));
}
};
</script>
32 changes: 26 additions & 6 deletions apps/showcase/doc/panel/pt/PTImage.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/panel.jpg" />
</div>
<DocSectionText v-bind="$attrs" />
<DocPTViewer :docs="ptViewerDoc">
<Panel header="Header" toggleable>
<p class="m-0">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</Panel>
</DocPTViewer>
</template>

<script>
import { getPTOptions } from '@/components/doc/helpers';
export default {
data() {
return {
ptViewerDoc: [
{
data: getPTOptions('Panel'),
key: 'Panel'
}
]
};
}
};
</script>
69 changes: 63 additions & 6 deletions apps/showcase/doc/tabs/pt/PTImage.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,65 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
</div>
<DocSectionText v-bind="$attrs" />
<DocPTViewer :docs="docs">
<Tabs value="0">
<TabList>
<Tab value="0">Header I</Tab>
<Tab value="1">Header II</Tab>
<Tab value="2">Header III</Tab>
</TabList>
<TabPanels>
<TabPanel value="0">
<p class="m-0">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</TabPanel>
<TabPanel value="1">
<p class="m-0">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim
ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi.
</p>
</TabPanel>
<TabPanel value="2">
<p class="m-0">
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa
qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus.
</p>
</TabPanel>
</TabPanels>
</Tabs>
</DocPTViewer>
</template>

<script>
import { getPTOptions } from '@/components/doc/helpers';
export default {
data() {
return {
docs: [
{
data: getPTOptions('Tabs'),
key: 'Tabs'
},
{
data: getPTOptions('TabList'),
key: 'TabList'
},
{
data: getPTOptions('Tab'),
key: 'Tab'
},
{
data: getPTOptions('TabPanels'),
key: 'TabPanels'
},
{
data: getPTOptions('TabPanel'),
key: 'TabPanel'
}
]
};
}
};
</script>

0 comments on commit ea59ca3

Please sign in to comment.