react-native-notification
Customizable toast-like notifications for React Native
Install
$ npm install react-native-notification
Usage
;; { thisstate = message: '' ; } { this; }; { return <View style=stylescontainer> <TouchableOpacity onPress=thisonPress> <Text style=stylestext>Tap me!</Text> </TouchableOpacity> <Notification message=thisstatemessage /> </View> ; } const styles = StyleSheet; ;
Customization
The styles of the notification are exposed as Notification.styles
. The container
property describes the notification container (by default the rounded gray-ish rectangle) and the message
property the message itself (the white color text).
What may be in store for future versions
- Allow message as
props.children
allowing other components to be part of the message - More unit tests
License
MIT (See LICENSE
)