Skip to content

[Snackbar] add contentStyle #3190

@onybo

Description

@onybo

The text content of a snackbar seems to be hardcoded to use the textColor from the current theme.
If I overide the background on the snackbar using the inline style bodyStyle={{background: myLightColor}} I would like to use a dark color for the text color.
One way to do this would be implementing a contentStyle on the Snackbar component so I could do:

<Snackbar
          open={true}
          message="a message here"
          onRequestClose={this.closeMessage}
          bodyStyle={{background: myLightColor}}
          contentStyle={{color: myDarkColor}}
        />

If you would add this or advise me on how to work around this I would be very happy.

Would you consider accepting a pull request for this if I make the required changes myself?

Metadata

Metadata

Labels

type: new featureExpand the scope of the product to solve a new problem.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions