jssql jssql - 4 months ago 40
React JSX Question

Set color of a snackbar element from material-ui

I am using a snackbar component from material-ui. At the moment the snackbar appear in black. Do you know how I can change the color? Background-color only changes the color of the whole div in which the snackbar is present. It does not change the color of the snackbar.


You have to set the bodyStyle property:

<Snackbar bodyStyle={{ backgroundColor: 'teal', color: 'coral' }} />

Ref the documentation