Skip to content

Commit

Permalink
feat(root-layout): DLT-1878 add scrollbar directive to root layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ninamarina committed Oct 24, 2024
1 parent 00b6143 commit 6b804f7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<dt-root-layout
:fixed="false"
:header-sticky="true"
:fixed="true"
header-class="d-ol-none"
sidebar-class="dialtone-sidebar lg:d-d-none d-ol-none"
footer-class="d-text-right d-ol-none"
Expand Down
40 changes: 22 additions & 18 deletions packages/dialtone-vue2/components/root_layout/root_layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,28 @@
if you want a fixed height. -->
<slot name="header" />
</header>
<aside
ref="root-layout-sidebar"
tabindex="0"
:class="['d-root-layout__sidebar', sidebarClass]"
data-qa="dt-root-layout-sidebar"
>
<!-- @slot Slot for sidebar content, be sure to set a width on the element within this. -->
<slot name="sidebar" />
</aside>
<main
ref="root-layout-content"
:class="['d-root-layout__content', contentClass]"
data-qa="dt-root-layout-content"
tabindex="0"
>
<!-- @slot Slot for the main content -->
<slot />
</main>
<div v-dt-scrollbar>
<aside
ref="root-layout-sidebar"
tabindex="0"
:class="['d-root-layout__sidebar', sidebarClass]"
data-qa="dt-root-layout-sidebar"
>
<!-- @slot Slot for sidebar content, be sure to set a width on the element within this. -->
<slot name="sidebar" />
</aside>
</div>
<div v-dt-scrollbar>
<main
ref="root-layout-content"
:class="['d-root-layout__content', contentClass]"
data-qa="dt-root-layout-content"
tabindex="0"
>
<!-- @slot Slot for the main content -->
<slot />
</main>
</div>
<footer
:class="['d-root-layout__footer', footerClass]"
data-qa="dt-root-layout-footer"
Expand Down
40 changes: 22 additions & 18 deletions packages/dialtone-vue3/components/root_layout/root_layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,28 @@
if you want a fixed height. -->
<slot name="header" />
</header>
<aside
ref="root-layout-sidebar"
tabindex="0"
:class="['d-root-layout__sidebar', sidebarClass]"
data-qa="dt-root-layout-sidebar"
>
<!-- @slot Slot for sidebar content, be sure to set a width on the element within this. -->
<slot name="sidebar" />
</aside>
<main
ref="root-layout-content"
:class="['d-root-layout__content', contentClass]"
data-qa="dt-root-layout-content"
tabindex="0"
>
<!-- @slot Slot for the main content -->
<slot />
</main>
<div v-dt-scrollbar>
<aside
ref="root-layout-sidebar"
tabindex="0"
:class="['d-root-layout__sidebar', sidebarClass]"
data-qa="dt-root-layout-sidebar"
>
<!-- @slot Slot for sidebar content, be sure to set a width on the element within this. -->
<slot name="sidebar" />
</aside>
</div>
<div v-dt-scrollbar>
<main
ref="root-layout-content"
:class="['d-root-layout__content', contentClass]"
data-qa="dt-root-layout-content"
tabindex="0"
>
<!-- @slot Slot for the main content -->
<slot />
</main>
</div>
<footer
:class="['d-root-layout__footer', footerClass]"
data-qa="dt-root-layout-footer"
Expand Down

0 comments on commit 6b804f7

Please sign in to comment.