Material-components-web: Drawer and Menu should explicitly document the need to import mdc-list scss

Created on 18 Jun 2018  路  7Comments  路  Source: material-components/material-components-web

Hi all
I am trying to use drawer and it seems it doesn't work. You can find the project as attached.
I would be very happy, if someone could tell me, what am I doing wrong.

Thanks
error.zip

backlog

All 7 comments

This is from #2866, right? Sorry I didn't get around to testing the zip until today. (I was actually confused for a moment when I saw #2866 closed.)

I think what's actually missing from your setup is that you also need @material/list:

  1. Run npm install @material/list
  2. Add @import "@material/list/mdc-list"; to your index.scss

You'll probably also want to include an element with the mdc-drawer__toolbar-spacer class (before your mdc-list-group element inside the drawer) to make the drawer items line up below the top app bar.

I will check and let you know.

Thanks

Hi @kfranqueiro
Now it works as expected. Thanks a lot.
Can you please mention on the website https://material.io/develop/web/components/drawers/ that the list have to be installed too? It would be nice for beginners.

Thanks

You're right, this should be mentioned in the docs. I'm going to reopen this so we can track that task.

Reopening this issue so it can be tracked for doc updates.

Whats the status on this? - I spent quite a bit of time looking through my code assuming the docs were correct. If we could get this implemented so others don't get frustrated that would be great :)

This is being handled within updates to MDC Menu and MDC Drawer for 0.39.0. The update to Menu's docs is already in master, and the update to Drawer's docs will be merged into its feature branch soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

16rajumane picture 16rajumane  路  3Comments

AbuMareBear picture AbuMareBear  路  3Comments

traviskaufman picture traviskaufman  路  3Comments

ghost picture ghost  路  3Comments

cintaccs picture cintaccs  路  3Comments