344303947 / react-notice-message

自由的去定义css 和 内容 。react-notice-message

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPM

React-notice-message (通知信息组件)

a simple and free messages notice with and for React.

Demo & Examples

Live demo: asd0102433.github.io/react-notice-message/example

The live demo is still running v1.0.8.

To build the new 1.0.0 examples locally, clone this repo then run:

npm install
npm start

Then open localhost:8080 in a browser. 或者直接 open example/index.html

Installation

npm install react-notice-message --save

At this point you can import react-notice-message and its styles in your application as follows:

import reactNotice from 'react-notice-message';

// you can modify css in the react-notice.css or Write one other css style , because the css is simple and crude.
import 'react-select/react-notice.css';

Usage

var reactNotice = require('react-notice-message');

//reactNotice.show(document, {closeTime:"3000"});
reactNotice.show(<p>messages</p>, options); //Value: 3000 or infinite
reactNotice.getHistoryMessages();

###options

  • closeTime: Any time, 3000 5000 or infinite;

Methods

// Show notice messages
reactNotice.show();

//Get history messages
reactNotice.getHistoryMessages();

License

MIT Licensed. Copyright (c) aotumen 2016.

About

自由的去定义css 和 内容 。react-notice-message


Languages

Language:JavaScript 99.4%Language:CSS 0.6%Language:HTML 0.0%