Created
December 31, 2014 06:42
-
-
Save yiminghe/710f5d34d1a9a789acf9 to your computer and use it in GitHub Desktop.
implement alert using rc-dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tmp = document.createElement('div'); | |
document.body.appendChild(tmp); | |
var React = require('react'); | |
var Dialog = require('rc-dialog'); | |
function alert(str){ | |
var dialog = <Dialog title="alert" visible="true">{str}</Dialog>; | |
React.render(dialog,tmp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment