sh-react-modal
v1.0.2
Published
A configurable modal component for ReactJS applications written in TypeScript.
Downloads
2
Maintainers
Readme
sh-react-modal
A configurable modal component for ReactJS application written in TypeScript.
var el = document.createElement('div');
el.className = 'container';
document.body.appendChild(el);
var service = ShReact.createModalService(el);
service.show({
content:(onSuccess,onHide)=>{
return (
React.createElement('div',{className:'test',onClick:onSuccess,title:'Test Dialog'},'Test')
);
},
props:{
title:"Test Dialog",
hasClose:true,
closeOnBackdrop:false
}})
.then(function(em){
return service.show({
content:(onSuccess,onCancel)=>{
return (null);
},
props:{
buttons:[{
label:'OK',
key:'ok'
},{
label:'Cancel',
key:'cancel'
}]
}});
},function(ez){
console.log(ez);
})
.then(function(et){
console.log(et);
});