react-notice-message

1.1.1 • Public • Published

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.

Package Sidebar

Install

npm i react-notice-message

Weekly Downloads

1

Version

1.1.1

License

ISC

Last publish

Collaborators

  • aotumen