From 6b4cc41e6879460a292c7e61169474a4fc39f24c Mon Sep 17 00:00:00 2001 From: Brad Paugh Date: Fri, 6 Oct 2023 14:19:45 -0700 Subject: [PATCH] fix(root-layout): use inner child width for sidebar (#1252) * fix(root-layout): use inner child width for sidebar * set 100p * docs --- components/root_layout/root_layout.stories.js | 6 +----- components/root_layout/root_layout.vue | 10 ++++------ components/root_layout/root_layout_default.story.vue | 4 ---- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/components/root_layout/root_layout.stories.js b/components/root_layout/root_layout.stories.js index 6b6537e3dc..e60131a79a 100644 --- a/components/root_layout/root_layout.stories.js +++ b/components/root_layout/root_layout.stories.js @@ -15,7 +15,7 @@ export const argsData = { header: '
Header
', footer: '
Footer
', sidebar: - '
Sidebar item 1
Sidebar item 2
Sidebar item 3
', + '
Sidebar item 1
Sidebar item 2
Sidebar item 3
', default: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam dignissim eleifend condimentum. Vestibulum euismod leo at finibus mattis. Integer ut dui id ligula tincidunt pellentesque. Vestibulum a ullamcorper risus. Ut tristique sapien eget magna lacinia, non interdum lacus malesuada. Proin augue lacus, finibus eget aliquam @@ -48,7 +48,6 @@ export const argTypesData = { // Slots default: { control: 'text', - description: 'Slot for main content', table: { type: { summary: 'VNode', @@ -57,7 +56,6 @@ export const argTypesData = { }, header: { - description: 'Slot for header content', control: 'text', table: { category: 'slots', @@ -68,7 +66,6 @@ export const argTypesData = { }, sidebar: { - description: 'Slot for sidebar content', control: 'text', table: { category: 'slots', @@ -79,7 +76,6 @@ export const argTypesData = { }, footer: { - description: 'Slot for footer content', control: 'text', table: { category: 'slots', diff --git a/components/root_layout/root_layout.vue b/components/root_layout/root_layout.vue index 59ec7354ca..cf58c099db 100644 --- a/components/root_layout/root_layout.vue +++ b/components/root_layout/root_layout.vue @@ -7,7 +7,7 @@ :class="['d-root-layout__header', { 'd-root-layout__header--sticky': headerSticky }, headerClass]" data-qa="dt-root-layout-header" > - @@ -19,10 +19,9 @@
- @@ -116,8 +115,7 @@ export default { }, /** - * The width of the sidebar - * Possible units rem|px|%|em + * DEPRECATED: set the height of the inner element instead. */ sidebarWidth: { type: String, diff --git a/components/root_layout/root_layout_default.story.vue b/components/root_layout/root_layout_default.story.vue index a5cff32ce6..e9f8485636 100644 --- a/components/root_layout/root_layout_default.story.vue +++ b/components/root_layout/root_layout_default.story.vue @@ -4,14 +4,10 @@ :body-class="$attrs.bodyClass" :header-class="$attrs.headerClass" :header-sticky="$attrs.headerSticky" - :header-height="$attrs.headerHeight" :content-class="$attrs.contentClass" - :content-wrap-width-percent="$attrs.contentWrapWidthPercent" :sidebar-class="$attrs.sidebarClass" :sidebar-position="$attrs.sidebarPosition" - :sidebar-width="$attrs.sidebarWidth" :footer-class="$attrs.footerClass" - :footer-height="$attrs.footerHeight" :fixed="$attrs.fixed" :responsive-breakpoint="$attrs.responsiveBreakpoint" >