Socket
Socket
Sign inDemoInstall

@unovo/rc-dialog

Package Overview
Dependencies
20
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @unovo/rc-dialog

dialog ui component for react


Version published
Weekly downloads
1
decreased by-75%
Maintainers
3
Install size
3.85 MB
Created
Weekly downloads
 

Readme

Source

rc-dialog


react dialog component

NPM version build status Test coverage gemnasium deps npm download

Screenshot

Install

rc-dialog

Usage

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

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

// use dialog

API

rc-dialog

nametypedefaultdescription
prefixClsStringrc-dialogThe dialog dom node's prefixCls
classNameStringadditional className for dialog
wrapClassNameStringadditional className for dialog wrap
styleObject{}Root style for dialog element.Such as width, height
zIndexNumber
bodyStyleObject{}body style for dialog body element.Such as height
maskStyleObject{}style for mask element.
visibleBooleanfalsecurrent dialog's visible status
animationStringpart of dialog animation css class name
maskAnimationStringpart of dialog's mask animation css class name
transitionNameStringdialog animation css class name
maskTransitionNameStringmask animation css class name
titleString|React.ElementTitle of the dialog
footerReact.Elementfooter of the dialog
closableBooleantruewhether show close button
maskBooleantruewhether show mask
maskClosableBooleantruewhether click mask to close
keyboardBooleantruewhether support press esc to close
mousePosition{x:number,y:number}set pageX and pageY of current mouse(it will cause transform origin to be set).
onClosefunction()called when click close button or mask
afterClosefunction()called when close animation end
getContainerfunction(): HTMLElementto determine where Dialog will be mounted
destroyOnCloseBooleanfalseto unmount child compenents on onClose
closeIconReactNodespecific the close icon.
forceRenderBooleanfalseCreate dialog dom node before dialog first show

Development

npm install
npm start

Example

http://localhost:8007/examples/

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

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-dialog is released under the MIT license.

Keywords

FAQs

Last updated on 05 Jul 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc