1.0.0 • Published 4 years ago

@gem-mine/rmc-dialog v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

@gem-mine/rmc-dialog


react dialog component for mobile

fork from m-dialog

Install

  yarn add @gem-mine/rmc-dialog

Usage

var Dialog = require('rmc-dialog');

ReactDOM.render(
  <Dialog title={title} onClose={callback1} visible>
      <p>first dialog</p>
  </Dialog>
), document.getElementById('t1'));

// use dialog

API

rmc-dialog(web)

namedescriptiontypedefault
prefixClsThe dialog dom node's prefixClsStringrmc-dialog
classNameadditional className for dialogString
wrapClassNameadditional className for dialog wrapString
styleRoot style for dialog element.Such as width, heightObject{}
zIndexz-indexNumber
bodyStylebody style for dialog body element.Such as heightObject{}
maskStylestyle for mask element.Object{}
visiblecurrent dialog's visible statusBooleanfalse
animationpart of dialog animation css class nameString
maskAnimationpart of dialog's mask animation css class nameString
transitionNamedialog animation css class nameString
maskTransitionNamemask animation css class nameString
titleTitle of the dialogStringReact.Element
footerfooter of the dialogReact.Element
closablewhether show close buttonBooleantrue
maskwhether show maskBooleantrue
maskClosablewhether click mask to closeBooleantrue
onClosecalled when click close button or maskfunction
forceRenderCreate dialog dom node before dialog first showBooleanfalse
getContainerto determine where Dialog will be mounted(): HTMLElement

Development

npm install
npm start

License

rmc-dialog is released under the MIT license.