react-native-snackbar-js
A simple snackbar component for react-native using pure js.
Usage
A default snackbar without action button.
<SnackBar visible=true text="Welcome!" />
Advanced snackbar usage with actions.
<SnackBar visible=thisstateshowSnackBar text="Item has been deleted" onPress= this onAction= this actionText="Undo"/>
Styles
For customizing styles, please see backgroundColor, textColor, and actionTextColor props.
Props
- visible: (required) handles component visibility
- text: (required) text to display to the component
- backgroundColor: (optional) change background color
- textColor: (optional) change text color
- onPress: (optional) callback to execute when component is pressed
- onAction: (optional) execute when action text is pressed
- actionText: (optional) a clickable text for
- actionTextColor: (optional) change color for action text