1.1.1 • Published 6 years ago

rmc-dialog v1.1.1

Weekly downloads
25,840
License
MIT
Repository
github
Last release
6 years ago

m-dialog


react dialog component for mobile

NPM version build status Test coverage gemnasium deps npm download

Screenshot

Install

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

rmc-dialog/lib/Dialog (react-native)

namedescriptiontypedefault
wrapStylestyle for modal wrapObject{}
maskStylestyle for modal maskObject{}
stylestyle for modalObject{}
animationTypeanimation type for modal content, can be one of none|fade|slide-up|slide-downStringslide-up
animationDurationanimation durationnumber300
visiblevisible statebooleanfalse
animateAppearwhether animation on first showbooleanfalse
onClosecalled when closeFunction()=>void
onAnimationEndcalled when animation endFunction(visible:boolean)=>void (animationType !== 'none')

Development

npm install
npm start

Example

http://localhost:8007/examples/

online example: http://react-component.github.io/m-dialog/

react-native

npm run rn-init
npm run watch-tsc
react-native start
react-native run-ios

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rmc-dialog is released under the MIT license.

1.1.1

6 years ago

1.1.0

6 years ago

1.0.6

6 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

0.0.1-alpha.4

7 years ago

0.0.1-alpha.3

7 years ago

0.0.1-alpha.2

7 years ago

0.0.1-alpha.1

7 years ago

0.0.1-alpha.0

7 years ago