0.0.3 • Published 8 years ago
react-simple-dialog v0.0.3
react-simple-dialog
Very simple react dialog
Install
npm install react-simple-dialog
Usage
import:
import Dialog from 'react-simple-dialog';
import 'react-simple-dialog/dist/dialog.css';
in JSX:
<Dialog ref='dialog'/>
in click:
this.refs.dialog.show({
config: {
title: 'info',
tip: 'confirm?'
},
okfunc: function(){
location.href = "#/ctrldesk"
}.bind(this)
});
Compile
babel ./src/dialog.js --out-file ./dist/dialog.js