react-native-toast-notification

1.1.2 • Public • Published

react-native-toast-notification

A react native component for toast message

License MIT

Installation

  • 1.Run npm i react-native-toast-notification --save or yarn add react-native-toast-notification
  • 2.import ToastNotification from 'react-native-toast-notification'

Screenshots

Getting started

Add react-native-easy-toast to your js file.

import ToastNotification from 'react-native-toast-notification'

Inside your component's render method, use ToastNotification:

 render() {
         return (
             <ToastNotification
                textStyle={{ color: 'red' }}
                style={{ backgroundColor: 'yellow' }}
                text="Hello World!"
                duration={2000}
                onHide={this._handleOnHideToastNotification}
             />
         );
 }
 

API

Props Type Optional Default Description
style object true Gray background etc. Custom style toast
isTop boolean true false Custom toast position
positionValue number true 100 Custom toast position value
duration number true 2000 Custom toast animation duration
textStyle style true white color etc. Custom style text
onPress function true null For handle on press
onHide function true null For handle on hide

MIT Licensed UE

Dependencies (0)

    Dev Dependencies (25)

    Package Sidebar

    Install

    npm i react-native-toast-notification

    Weekly Downloads

    30

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    9.79 kB

    Total Files

    10

    Last publish

    Collaborators

    • ue