Add new overlay panel demo
parent
c215791fe5
commit
3a23abc41a
|
@ -3,10 +3,65 @@
|
|||
<p>OverlayPanel is accessed via its ref and visibility is controlled using <i>toggle</i>, <i>show</i> and <i>hide</i> functions with an event of the target.</p>
|
||||
</DocSectionText>
|
||||
<div class="card flex justify-content-center">
|
||||
<Button type="button" icon="pi pi-image" label="Image" @click="toggle" />
|
||||
<Button type="button" icon="pi pi-share-alt" label="Share" @click="toggle" />
|
||||
|
||||
<OverlayPanel ref="op">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" />
|
||||
<div class="flex flex-column gap-3 w-25rem">
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Share this document</span>
|
||||
<InputGroup>
|
||||
<InputText value="https://primevue.org/12323ff26t2g243g423g234gg52hy25XADXAG3" readonly class="w-25rem"></InputText>
|
||||
<InputGroupAddon>
|
||||
<i class="pi pi-copy"></i>
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Invite Member</span>
|
||||
<InputGroup>
|
||||
<Chips disabled></Chips>
|
||||
<Button label="Invite" icon="pi pi-users"></Button>
|
||||
</InputGroup>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Team Members</span>
|
||||
<ul class="list-none p-0 m-0 flex flex-column gap-3">
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Amy Elsner</span>
|
||||
<div class="text-sm text-color-secondary">amy@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Owner</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/bernardodominic.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Bernardo Dominic</span>
|
||||
<div class="text-sm text-color-secondary">bernardo@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Editor</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/ionibowcher.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Ioni Bowcher Elsner</span>
|
||||
<div class="text-sm text-color-secondary">ioni@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Viewer</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</OverlayPanel>
|
||||
</div>
|
||||
<DocSectionCode :code="code" />
|
||||
|
@ -21,7 +76,62 @@ export default {
|
|||
<Button type="button" icon="pi pi-image" label="Image" @click="toggle" />
|
||||
|
||||
<OverlayPanel ref="op">
|
||||
<img src="/images/product/bamboo-watch.jpg" alt="Bamboo Watch" />
|
||||
<div class="flex flex-column gap-3 w-25rem">
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Share this document</span>
|
||||
<InputGroup>
|
||||
<InputText value="https://primevue.org/12323ff26t2g243g423g234gg52hy25XADXAG3" readonly class="w-25rem"></InputText>
|
||||
<InputGroupAddon>
|
||||
<i class="pi pi-copy"></i>
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Invite Member</span>
|
||||
<InputGroup>
|
||||
<Chips disabled></Chips>
|
||||
<Button label="Invite" icon="pi pi-users"></Button>
|
||||
</InputGroup>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Team Members</span>
|
||||
<ul class="list-none p-0 m-0 flex flex-column gap-3">
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Amy Elsner</span>
|
||||
<div class="text-sm text-color-secondary">amy@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Owner</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/bernardodominic.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Bernardo Dominic</span>
|
||||
<div class="text-sm text-color-secondary">bernardo@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Editor</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/ionibowcher.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Ioni Bowcher Elsner</span>
|
||||
<div class="text-sm text-color-secondary">ioni@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Viewer</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</OverlayPanel>
|
||||
`,
|
||||
options: `
|
||||
|
@ -30,7 +140,62 @@ export default {
|
|||
<Button type="button" icon="pi pi-image" label="Image" @click="toggle" />
|
||||
|
||||
<OverlayPanel ref="op">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" />
|
||||
<div class="flex flex-column gap-3 w-25rem">
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Share this document</span>
|
||||
<InputGroup>
|
||||
<InputText value="https://primevue.org/12323ff26t2g243g423g234gg52hy25XADXAG3" readonly class="w-25rem"></InputText>
|
||||
<InputGroupAddon>
|
||||
<i class="pi pi-copy"></i>
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Invite Member</span>
|
||||
<InputGroup>
|
||||
<Chips disabled></Chips>
|
||||
<Button label="Invite" icon="pi pi-users"></Button>
|
||||
</InputGroup>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Team Members</span>
|
||||
<ul class="list-none p-0 m-0 flex flex-column gap-3">
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Amy Elsner</span>
|
||||
<div class="text-sm text-color-secondary">amy@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Owner</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/bernardodominic.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Bernardo Dominic</span>
|
||||
<div class="text-sm text-color-secondary">bernardo@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Editor</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/ionibowcher.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Ioni Bowcher Elsner</span>
|
||||
<div class="text-sm text-color-secondary">ioni@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Viewer</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</OverlayPanel>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -51,7 +216,62 @@ export default {
|
|||
<Button type="button" icon="pi pi-image" label="Image" @click="toggle" />
|
||||
|
||||
<OverlayPanel ref="op">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" />
|
||||
<div class="flex flex-column gap-3 w-25rem">
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Share this document</span>
|
||||
<InputGroup>
|
||||
<InputText value="https://primevue.org/12323ff26t2g243g423g234gg52hy25XADXAG3" readonly class="w-25rem"></InputText>
|
||||
<InputGroupAddon>
|
||||
<i class="pi pi-copy"></i>
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Invite Member</span>
|
||||
<InputGroup>
|
||||
<Chips disabled></Chips>
|
||||
<Button label="Invite" icon="pi pi-users"></Button>
|
||||
</InputGroup>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium text-900 block mb-2">Team Members</span>
|
||||
<ul class="list-none p-0 m-0 flex flex-column gap-3">
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Amy Elsner</span>
|
||||
<div class="text-sm text-color-secondary">amy@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Owner</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/bernardodominic.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Bernardo Dominic</span>
|
||||
<div class="text-sm text-color-secondary">bernardo@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Editor</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex align-items-center gap-2">
|
||||
<img src="https://primefaces.org/cdn/primevue/images/avatar/ionibowcher.png" style="width: 32px" />
|
||||
<div>
|
||||
<span class="font-medium">Ioni Bowcher Elsner</span>
|
||||
<div class="text-sm text-color-secondary">ioni@email.com</div>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
|
||||
<span>Viewer</span>
|
||||
<i class="pi pi-angle-down"></i>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</OverlayPanel>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<span class="text-600">{{ selectedProduct.category }}</span>
|
||||
</div>
|
||||
|
||||
<OverlayPanel ref="op" appendTo="body" showCloseIcon>
|
||||
<OverlayPanel ref="op" appendTo="body">
|
||||
<DataTable v-model:selection="selectedProduct" :value="products" selectionMode="single" :paginator="true" :rows="5" @row-select="onProductSelect">
|
||||
<Column field="name" header="Name" sortable style="min-width: 12rem"></Column>
|
||||
<Column header="Image">
|
||||
|
@ -57,7 +57,7 @@ export default {
|
|||
<span class="text-600">{{ selectedProduct.category }}</span>
|
||||
</div>
|
||||
|
||||
<OverlayPanel ref="op" appendTo="body" showCloseIcon>
|
||||
<OverlayPanel ref="op" appendTo="body">
|
||||
<DataTable v-model:selection="selectedProduct" :value="products" selectionMode="single" :paginator="true" :rows="5" @row-select="onProductSelect">
|
||||
<Column field="name" header="Name" sortable style="width: 50%"></Column>
|
||||
<Column header="Image" style="width: 20%">
|
||||
|
@ -90,7 +90,7 @@ export default {
|
|||
<span class="text-600">{{ selectedProduct.category }}</span>
|
||||
</div>
|
||||
|
||||
<OverlayPanel ref="op" appendTo="body" showCloseIcon>
|
||||
<OverlayPanel ref="op" appendTo="body">
|
||||
<DataTable v-model:selection="selectedProduct" :value="products" selectionMode="single" :paginator="true" :rows="5" @row-select="onProductSelect">
|
||||
<Column field="name" header="Name" sortable style="min-width: 12rem"></Column>
|
||||
<Column header="Image">
|
||||
|
@ -152,7 +152,7 @@ export default {
|
|||
<span class="text-600">{{ selectedProduct.category }}</span>
|
||||
</div>
|
||||
|
||||
<OverlayPanel ref="op" appendTo="body" showCloseIcon>
|
||||
<OverlayPanel ref="op" appendTo="body">
|
||||
<DataTable v-model:selection="selectedProduct" :value="products" selectionMode="single" :paginator="true" :rows="5" @row-select="onProductSelect">
|
||||
<Column field="name" header="Name" sortable style="min-width: 12rem"></Column>
|
||||
<Column header="Image">
|
||||
|
|
Loading…
Reference in New Issue