1.0.1 • Published 2 years ago

rn-toasty v1.0.1

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

Original repo here

https://github.com/prscX/react-native-toasty

Note:

  • This fork uses only the default Toast with props, it doesn't have icons support (reduced bundle size caused by react-native-vector-icons fonts)
  • Supports RN 0.60+

Getting Started

npm install rn-toasty

react-native link rn-toasty and remove Android linking

Usage

import { RNToasty } from "rn-toasty";
// simple
RNToasty.Show({
  title: "This is a toast"
});

// with props
RNToasty.Show({
  title: "Hello toast",
  tintColor: "#657786",
  titleColor: "#f1f1f1",
  titleSize: 18,
  duration: 1
});

Updated Props

PropTypeDefaultNote
titlestringSpecify the title of toast
titleSizenumber16Specify the title size
titleColorstring: HEX-COLOR#FFFFFFSpecify the title color
durationnumber0Specify the duration of toast: 0: SHORT; 1: LONG
tintColorstring: HEX-NUMBER#000000Specify the tint color of toast

Thank to https://github.com/prscX