Skip to content

color attribute of textStyle takes precedence over disabledTextColor #119

Description

@Inspirateur

I'm using the lib on snack (web) and I'm defining a series of MenuItem like so

const types = ['Series', 'Books', 'Movies', 'Animes', 'Games'];

types.map((t) => {
  return (<MenuItem 
    disabled={t==type} 
    onPress={() => select(t)} 
    disabledTextColor='#ff0000'
    textStyle={{color: "white", fontSize: "1em"}}
  >{t}</MenuItem>)
})

But when I display the menu all items are white including the disabled item which should have been red.
When I remove color: "white" the disabled item shows up red as expected but of course the rest of the text is default color.

I think it should be fixed if possible and if not a workaround should be displayed somewhere in the readme when listing the properties of MenuItem because this seems like a very common need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions