-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No 2nd app-drawer supported in 2.0 preview? #427
Comments
Hi @PaulHMason, The app-drawer-layout element was only ever intended to support one drawer - in fact in 1.0, app-drawer-layout would only ever toggle the state of the first (left) drawer. For this reason, we removed the misleading "two drawers" demo as part of the work to migrate to 2.0. |
Hmmmm, that's a bit of a let down - being able have a second drawer that can be manually toggled is very useful for business type applications. |
You can still have two app-drawer's on your page; you'll just need to control the layout yourself (since there's a variety of cases and we can't cover them all in app-drawer-layout). For example: <style>
main { margin: 0 256px; }
</style>
<app-drawer opened persistent></app-drawer>
<app-drawer align="right" opened persistent></app-drawer>
<main></main> With that said, you should definitely evaluate whether you really need to use app-drawer or if a |
Seems to work for me. I have navigation on the right and drawer for additional menu items on left.
|
@rkief Thanks for the example. |
For the record, I need two menus both left and right and I do need to be able to toggle and swipe them. I'm going to try and make a fork and example as I think this is a pretty common layout. |
If you read through the code in #contentContainer[drawer-position=left] {
margin-left: var(--app-drawer-width, 256px);
}
#contentContainer[drawer-position=right] {
margin-right: var(--app-drawer-width, 256px);
}
It is possible to have two drawers as requested by using two nested app-drawer layouts. Just take your existing layout with one drawer and wrap it in another app-drawer-layout. <app-drawer-layout>
<app-drawer slot="drawer" align="right" opened persistent>right drawer</app-drawer>
<app-drawer-layout>
<app-drawer slot="drawer" opened persistent>left drawer</app-drawer>
<main>main content</main>
</app-drawer-layout>
</app-drawer-layout> With that said, it would be nice to offer a separate component.. say |
Description
In v1 I could have two app-drawer elements (left and right) in an app-drawer-layout element, but with v2 I can only have one.
Expected outcome
I should be able to have both a left and right drawer.
Actual outcome
I can only have a left or a right drawer.
The text was updated successfully, but these errors were encountered: