1.1.4 • Published 7 years ago

dialog-react v1.1.4

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

Toast toast

Confirm toast

ConfirmAuto toast

Prompt toast

Notification toast

How to use

  • install

npm install --save-dev dialog-react style-loader css-loader

  • webpack.config.js
// add loader
{
	test: /\.css$/,
	loader: "style-loader!css-loader"
}
  • import

import {Toast, Confirm, Prompt, ConfirmAuto, Notificaion} from "dialog-react"

many or one more

  • use
<Toast
	content="测试用例"
	show={this.state.showDialog}
	long={1}
	close={() => this.setState({showDialog: false})} />
<Confirm
	content="测试用例"
	confirm="好的"
	show={this.state.showDialog}
	close={() => this.setState({showDialog: false})} />
<Prompt
	content="测试用例"
	confirm="好的"
	other="重新输入"
	show={this.state.showDialog}
	fun={() => this.setState({showDialog: false})}
	close={() => this.setState({showDialog: false})} />
<ConfirmAuto
	content="测试用例"
	show={this.state.showDialog}
	close={() => this.setState({showDialog: false})} />
<Notification
	content={this.state.content}
	fun={_funClick}
	funName="下一条"
	show={this.state.showDialog}
	close={() => this.setState({showDialog: false})}/>