1.4.0 • Published 3 years ago

rn-x-toast v1.4.0

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

rn-x-toast

Toast component for both platform Android and iOS.
Using scalessec/Toast on iOS and android.widget.Toast on Android.

Thanks

This project inspired by scalessec/Toast, remobile/react-native-toast

Getting started

$ yarn add rn-x-toast

IOS linking

$ cd ios && pod install

ReBuild

$ npx react-native run-ios

$ npx react-native run-android

Usage

import React from 'react'
import { TouchableOpacity } from 'react-native'
import Toast from 'rn-x-toast';

type DurationType = 'LONG' | 'DEFAULT' | 'SHORT'
/*
  Duration(seconds) to show Toast: LONG = 3.5, DEFAULT = 2, SHORT = 1
*/

function SomeComponent() {

  const doToast = () => {
    Toast.showToastCenter('Toast some message in the center', 'LONG');
    // Toast.showToastTop();
    // Toast.showToastBottom();
  }

  return (
    <TouchableOpacity onPress={doToast}>
      <Text>{"Press Me To Toast"}</Text>
    </TouchableOpacity>
  )
}

export default SomeComponent

Features requested:

- Toast on IOS with small icon/image on the head-left of message

- Toast message can be use with fontstyle/fontsize/fontweight/fontfamily/...otherTextStyles

contact: https://t.me/minhnh1996

1.3.7

3 years ago

1.4.0

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.2.9

3 years ago

1.3.0

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago