How to change the color of action in Snackbar?
How to change the color of action in Snackbar?
Hi guys ! Help to understand how to change the color of the action in Snackbar ?
<Snackbar
visible={this.state.visible}
onDismiss={() => this.setState({ visible: false })}
action={{
label: "Undo",
onPress: () => this.setState({ isHidden: true })}}>
You are registered on {namefilm}
</Snackbar>
You can change it via theme prop:
theme={{ colors: { accent: 'red' }}}
Hmm, this doesn't feel quite right. Why doesn't the Context-provided theme apply to this specific component?
and, how to change the label color?
@potier97 in case you didn't find an answer - it's better to check TS definitions of Theme. I tried a few to find that I needed to change:

theme={{ colors: {surface: 'blue', accent: 'red'},}}
The example above describes the snackbar text color (and label color) as blue and the action color as red.
I think this component should have a mode component that takes 'danger', 'error', 'info' etc...
action={{
icon: "close",
color: "#FF00FF", // <---- Add this.
label: "Undo",
onPress: () => this.setState({ isHi.....
With theme version 3, you can use
theme={{colors: {inversePrimary: Colors.white }}}
Hi, you should use the property textColor inside object action. in this example is red
<Snackbar
visible={visible}
action={{ label: 'Understan', textColor: 'red' }}
onDismiss={ () => handleErrors() }>
{message}
</Snackbar>
Some one knows how to change the size of the label inside the action?Without touching the code inside of the module of react-native-paper ?