1.0.7 • Published 6 years ago

react-native-snackbar-js v1.0.7

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

react-native-snackbar-js

npm version

Alt Text

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={this.state.showSnackBar}
  text="Item has been deleted"
  onPress={() => this.setState({ showSnackBar: false })}
  onAction={() => this.undoDelete()}
  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
1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago