New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

rc-dialog

Package Overview
Dependencies
Maintainers
8
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-dialog

dialog ui component for react

Source
npmnpm
Version
7.2.1
Version published
Weekly downloads
0
Maintainers
8
Weekly downloads
 
Created
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.

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

react

FAQs

Package last updated on 05 Sep 2018

Related posts