This package has been deprecated

Author message:

this package has been deprecated

react-native-snackbar-js

1.0.7 • Public • Published

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

Package Sidebar

Install

npm i react-native-snackbar-js

Weekly Downloads

10

Version

1.0.7

License

ISC

Unpacked Size

214 kB

Total Files

4

Last publish

Collaborators

  • npm