Skip to content

Commit

Permalink
Fixed #3217
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Nov 18, 2022
1 parent 15e56bd commit 8064dd6
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 27 deletions.
10 changes: 9 additions & 1 deletion api-generator/components/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,19 @@ const SidebarEvents = [
}
];

const SidebarSlots = [
{
name: "header",
description: "Custom content for the component's header"
}
];

module.exports = {
sidebar: {
name: "Sidebar",
description: "Sidebar is a panel component displayed as an overlay at the edges of the screen.",
props: SidebarProps,
events: SidebarEvents
events: SidebarEvents,
slots: SidebarSlots
}
};
1 change: 1 addition & 0 deletions src/components/sidebar/Sidebar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ declare class Sidebar extends Vue {
$emit(eventName: 'hide'): this;
$slots: {
'': VNode[];
'header': VNode[];
}
}

Expand Down
9 changes: 1 addition & 8 deletions src/components/sidebar/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@
<div v-if="$slots.header" class="p-sidebar-header-content">
<slot name="header"></slot>
</div>
<button
class="p-sidebar-close p-sidebar-icon p-link"
@click="hide"
:aria-label="ariaCloseLabel"
v-if="showCloseIcon"
type="button"
v-ripple
>
<button class="p-sidebar-close p-sidebar-icon p-link" @click="hide" :aria-label="ariaCloseLabel" v-if="showCloseIcon" type="button" v-ripple>
<span class="p-sidebar-close-icon pi pi-times" />
</button>
</div>
Expand Down
18 changes: 18 additions & 0 deletions src/views/sidebar/SidebarDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,24 @@ import Sidebar from 'primevue/sidebar';
</table>
</div>

<h5>Slots</h5>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Name</th>
<th>Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td>header</td>
<td>-</td>
</tr>
</tbody>
</table>
</div>

<h5>Styling</h5>
<p>Following is the list of structural style classes, for theming classes visit <router-link to="/theming">theming</router-link> page.</p>
<div class="doc-tablewrapper">
Expand Down
18 changes: 0 additions & 18 deletions src/views/slider/SliderDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,6 @@ export default {
</table>
</div>

<h5>Slots</h5>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Name</th>
<th>Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td>header</td>
<td>-</td>
</tr>
</tbody>
</table>
</div>

<h5>Styling</h5>
<p>Following is the list of structural style classes, for theming classes visit <router-link to="/theming">theming</router-link> page.</p>
<div class="doc-tablewrapper">
Expand Down

0 comments on commit 8064dd6

Please sign in to comment.