Material-ui: colors undefined

Created on 6 Dec 2018  路  2Comments  路  Source: mui-org/material-ui

Hi I'm create MuiTheme.js and I used the update version of material ui

My error looks like this
TypeError: Cannot read property 'cyan500' of undefined

and my MuiTheme.js Looks like this

import { colors, spacing, zIndex } from '@material-ui/core/styles';

export default {
  spacing,
  zIndex,
  fontFamily: 'Roboto, sans-serif',
  palette: {
    accent1Color: colors.cyan500,
    textColor: colors.blueGrey700,
  },
  bottomNavigation: {
    unselectedColor: colors.blueGrey700,
    selectedColor: colors.blue700,
  },
};

can you help me the proper set up why my colors in undefiend ?

question

Most helpful comment

- colors.cyan500
+ colors.cyan['500']

Why did you think you could access the colors the way you did?

All 2 comments

- colors.cyan500
+ colors.cyan['500']

Why did you think you could access the colors the way you did?

@eps1lon actually I forgot how I set up my material ui in my old project :) Thanks for helping me out there

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

ericraffin picture ericraffin  路  3Comments

FranBran picture FranBran  路  3Comments

chris-hinds picture chris-hinds  路  3Comments

ryanflorence picture ryanflorence  路  3Comments