tleunen / react-mdl

React Components for Material Design Lite
https://tleunen.github.io/react-mdl/
MIT License
1.76k stars 255 forks source link

No drawer button with standalone drawer #471

Closed jiantongc closed 7 years ago

jiantongc commented 7 years ago

Rendered drawer:

<div class="mdl-layout__drawer">
  <span class="mdl-layout-title">Title</span>
  <nav class="mdl-navigation">
    <a href="" class="mdl-navigation__link">Link</a>
    <a href="" class="mdl-navigation__link">Link</a>
    <a href="" class="mdl-navigation__link">Link</a>
    <a href="" class="mdl-navigation__link">Link</a>
  </nav>
</div>

You can see that the button (mdl-layout__drawer-button) is not being rendered. https://github.com/react-mdl/react-mdl/blob/master/src/Layout/Drawer.js

Question was in stackoverflow

jiantongc commented 7 years ago

Ah... have to use

import 'react-mdl/extra/material.css'
import 'react-mdl/extra/material.js'

instead of

import "material-design-lite/material.css"
import "material-design-lite/material.min.js"