Socket
Socket
Sign inDemoInstall

rn-simple-toast

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rn-simple-toast

React Native Toast component for both iOS and Android


Version published
Weekly downloads
20
decreased by-4.76%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

rn-simple-toast

React Native Toast component for both iOS and Android

Add it to your project

  1. Insall package
    • Using NPM npm i -S rn-simple-toast
    • Using Yarn yarn add rn-simple-toast
  2. Import package import { Toast, DURATION, POSTION } from 'rn-simple-toast';

Usage

import React from 'react';
import { Toast, DURATION  } from 'rn-simple-toast';
class App extends React.Component  {
    render() {
        return (
            <View style={styles.container}>
                <Toast ref={_ref => this.toastRef = _ref} />
                <Button
                    onPress={() => {
                        toastRef.show('Some message here', '#3498db', DURATION.LONG);
                    }}
                    title='Show message'
                    style={{ width: 120, backgroundColor: 'darkviolet' }}
                    textColor='#fff'
                />
            </View>
        );
    }
}
DEMO

iOS Android

Props

  • duration (String) - Duration time to display message.
  • containerStyle (String) Style of toast container.
  • textStyle (Function) - Style of text message
  • position (String) - Message display position
  • positionOffset (String) - Distance from top or bottom to display message

Method

  • show - The method to show toast message

MIT Licensed

Keywords

FAQs

Last updated on 28 Sep 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc