# react-native-dj-toastwithicon

> daojia react-native-dj-toastwithicon

Latest version **1.0.6** (published 2017-02-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-native-dj-toastwithicon
pnpm add react-native-dj-toastwithicon
yarn add react-native-dj-toastwithicon
bun add react-native-dj-toastwithicon
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2017-02-20 |
| First published | 2016-12-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | joy ye |
| Maintainers | birenjie |
| Keywords | daojia, toastwithicon |

## Links

- npm: https://www.npmjs.com/package/react-native-dj-toastwithicon
- npm.io page: https://npm.io/package/react-native-dj-toastwithicon

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2017-02-20
- 1.0.5 — 2017-02-20
- 1.0.4 — 2016-12-15
- 1.0.3 — 2016-12-12
- 1.0.2 — 2016-12-12
- 1.0.1 — 2016-12-10

## README

# Toast

![accordion](http://images.daojia.com/img/4d509dfffc7154ea51d66af023c72447.png)

## Install
```shell
npm i --save react-native-dj-toastwithicon
```

## Usage
Using in your app will usually look like this:
```js
import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  TouchableHighlight,
} from 'react-native';

import Toast from 'react-native-dj-toast';


export default class NPMTest extends Component {

    render() {
      return (
        <View style={{marginTop:20}}>
          <TouchableHighlight onPress={()=>this.refs.toast.show('This is a toast!')}>
            <Text>click me</Text>
          </TouchableHighlight>
          <Toast ref="toast" />
        </View>
      );
    }
}

AppRegistry.registerComponent('xxx', () => NPMTest);
```

## Props
The following props can be used to modify the style and/or behaviour:

| Prop | Type | Opt/Required | Default | Note |
|---|---|---|---|---|
|__`icons`__|_array_|Option|`[]`| 需要显示的icon，可以传多个icon，形式如 [require('image!success_black'),require('image!error_black')]


## Methods
The following methods can be used to open and close the Dialog:

| Method | Parameters | Note |
|---|---|---|
|__`show`__|`message:需要显示的信息，time:toast显示的时长,默认为2000ms，iconIdx:需要显示的icon在icons数组中的位置`|iconIdx可不传，默认为0|

---
_Source: https://npm.io/package/react-native-dj-toastwithicon · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
