0.1.6 • Published 7 years ago

aiserg-react-native-snackbar v0.1.6

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

react-native-snackbar

Implementation of the material design snacker component. See Google Design

Installation

To use this extension, you have to do the following steps:

  1. In your react-native project, run

    npm install react-native-snackbar
  2. Link your library using rpm link (learn more about rnpm) or following react-native doc guide.

  3. Import it in you JS, where you want to show a snacker

    import Snackbar from 'react-native-snackbar' 

Usage

To show a simple snackbar simply call:

Snackbar.show({
	title: 'Hello world',
	duration: Snackbar.LENGTH_INDEFINITE, // optional
	// Can be .LENGTH_INDEFINITE | .LENGTH_LONG | LENGTH_SHORT
})

..Preview..

To add an action:

Snackbar.show({
	title: 'Hello world',
	action: {
		title: 'UNDO',
		color: 'green',
		onPress: () => {
			// do something here
		},
	},
})

..Preview..

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago