diff --git a/api-generator/components/sidebar.js b/api-generator/components/sidebar.js index dedd1e444..8aef51f89 100644 --- a/api-generator/components/sidebar.js +++ b/api-generator/components/sidebar.js @@ -60,11 +60,19 @@ const SidebarEvents = [ } ]; +const SidebarSlots = [ + { + name: "header", + description: "Custom content for the component 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 } }; diff --git a/src/components/sidebar/Sidebar.d.ts b/src/components/sidebar/Sidebar.d.ts index 1eb286e82..98ab3b586 100755 --- a/src/components/sidebar/Sidebar.d.ts +++ b/src/components/sidebar/Sidebar.d.ts @@ -51,6 +51,10 @@ export interface SidebarSlots { * Custom content template. */ default: () => VNode[]; + /** + * Custom header template. + */ + header: () => VNode[]; } export declare type SidebarEmits = { diff --git a/src/components/sidebar/Sidebar.vue b/src/components/sidebar/Sidebar.vue index 7ea92f1fc..59cb2f692 100755 --- a/src/components/sidebar/Sidebar.vue +++ b/src/components/sidebar/Sidebar.vue @@ -3,6 +3,9 @@
+
+ +
diff --git a/src/views/sidebar/SidebarDoc.vue b/src/views/sidebar/SidebarDoc.vue index 77edc23bf..a3ed4f7e1 100755 --- a/src/views/sidebar/SidebarDoc.vue +++ b/src/views/sidebar/SidebarDoc.vue @@ -141,6 +141,24 @@ import Sidebar from 'primevue/sidebar';
+
Slots
+
+ + + + + + + + + + + + + +
NameParameters
header-
+
+
Styling

Following is the list of structural style classes, for theming classes visit theming page.