Material-ui: Cannot resolve module 'material-ui/FloatingActionButton

Created on 8 Mar 2018  路  4Comments  路  Source: mui-org/material-ui

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)


using version 1.0.0-beta.35, and trying to add fab button to UI, I got errors:

1 Module not found: Error: Cannot resolve module 'material-ui/FloatingActionButton'

2 Module not found: Error: Cannot resolve module 'material-ui/svg-icons/content/add'

Context

Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | |
| React | |
| browser | |
| etc | |

question

Most helpful comment

@smokinjoe You need to use a more recent version of Material-UI. The Fab component was recently introduced.

All 4 comments

@astw Don't mix v0.x documentation with v1.x documentation. You need to use: https://material-ui-next.com/demos/buttons/.

I'm trying to use that documentation with Material-UI 3.2.2 but am getting:

Cannot find module '@material-ui/core/Fab'. when trying to import Fab from '@material-ui/core/Fab';

Any tips?

@smokinjoe You need to use a more recent version of Material-UI. The Fab component was recently introduced.

@oliviertassinari - thanks! For now I was able to get it to work utilizing <Button variant="extendedFab">

I'll definitely look into upgrading.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

reflog picture reflog  路  3Comments

chris-hinds picture chris-hinds  路  3Comments

ericraffin picture ericraffin  路  3Comments

FranBran picture FranBran  路  3Comments