Reputation: 1022
I have a create-react-app based application. The following import used to work with material-ui v0.19.0.
import FlatButton from 'material-ui/FlatButton';
When I upgraded to the "next" version (i.e. v1-beta), the import fails with:
Module not found: Can't resolve 'material-ui/FlatButton' in '..../src/components'
Any ideas, what may be causing this?
Upvotes: 1
Views: 165
Reputation: 7390
The API has changed for v1, especially for Button:
import Button from 'material-ui/Button';
The individual components that existed for flat, raised, and floating-action buttons have been merged into Button
. Flat is the default presentation. Raised and floating-action presentations are specified via the raised
and fab
boolean properties, respectively (both default to false).
Take a look at the component demo to get a feel for how the various buttons can be used and review the API documentation.
Upvotes: 2