cosmos icon indicating copy to clipboard operation
cosmos copied to clipboard

Invalid prop when using cosmos token in Icon

Open hzalaz opened this issue 6 years ago • 0 comments
trafficstars

Describe the bug Getting this error in logs

console.error ../node_modules/prop-types/checkPropTypes.js:19
      Warning: Failed prop type: Invalid prop `color` of value `#FAFAFA` supplied to `Icon`, expected one of ["white","black","default","gray","grayDarkest","grayDark","grayMedium","grayLight","grayLightest","blueDarker","blue","blueLight","blueLightest","orange","orangeLighter","orangeLightest","orangeDark","greenDarker","green","red","redDarker","yellow"].
          in Icon (created by Menu)
          in Menu

Expected behavior No error logs

Screenshots

Cosmos version: v0.9.1

Additional context Using this code

import { colors } from "@auth0/cosmos/tokens";
const appearance="cta";

const element = (<Icon name="chevron-down" color={colors.button[appearance].text} />)

hzalaz avatar Dec 01 '18 02:12 hzalaz