react-native-rct-toast
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

rn-native-toast

react native toast

Installation

npm install react-native-rct-toast

Usage

import Toast from "react-native-rct-toast";

// ...

Toast.show(message: string,duration: number,position: number,style: styleType): void

Toast.hide();

export interface styleType {
  backgroundColor?: string; //背景色 #ffffff
  color?: string; //字体颜色 #333333
  horizontalPadding?: number; //横向padding
  verticalPadding?: number; //垂直方向padding
  fontSize?: number; //文字大小
  fontWeight?: string; //字体是否粗体 bold | false
  radius?: number; //圆角
}

type RCTToastType = {
  show(
    message: string,
    duration: number,
    position: number,
    style: styleType
  ): void;
  hide(): void;
  SHORT: number;
  LONG: number;
  TOP: number;
  CENTER: number;
  BOTTOM: number;
};

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Dependencies (0)

    Dev Dependencies (19)

    Package Sidebar

    Install

    npm i react-native-rct-toast

    Weekly Downloads

    2

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    66.3 kB

    Total Files

    27

    Last publish

    Collaborators

    • 900etrip