9.6.0 • Published 3 months ago

rc-dialog v9.6.0

Weekly downloads
545,700
License
MIT
Repository
github
Last release
3 months ago

rc-dialog

react dialog component

NPM version dumi build status Test coverage npm download bundle size

Screenshot

Example

http://localhost:8007/examples/

online example: https://dialog.react-component.vercel.app/

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

NameTypeDefaultDescriptionVersion
prefixClsStringrc-dialogThe dialog dom node's prefixCls
classNameStringadditional className for dialog
classNames{ header?: string; body?: string; footer?: string; mask?: string; content?: string; wrapper?: string; }pass className to target area
styles{ header?: CSSProperties; body?: CSSProperties; footer?: CSSProperties; mask?: CSSProperties; content?: CSSProperties; wrapper?: CSSProperties; }pass styles to target area
styleObject{}Root style for dialog element.Such as width, height
zIndexNumber
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
closableBoolean | ({ closeIcon?: React.ReactNode; disabled?: boolean } & React.AriaAttributestruewhether 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
focusTriggerAfterCloseBooleantruefocus trigger element when dialog closed
modalRender(node: ReactNode) => ReactNodeCustom modal content render8.3.0

Development

npm install
npm start

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-dialog is released under the MIT license.

9.0.4

4 months ago

9.0.3

4 months ago

9.5.2

6 months ago

9.5.1

6 months ago

9.5.0

6 months ago

9.6.0

3 months ago

9.4.0

9 months ago

9.3.4

1 year ago

9.3.3

1 year ago

9.3.2

1 year ago

9.3.1

1 year ago

9.3.0

1 year ago

9.2.0

1 year ago

9.1.0

2 years ago

9.0.2

2 years ago

9.0.1

2 years ago

9.0.0

2 years ago

8.8.2

2 years ago

8.9.0

2 years ago

8.7.0

3 years ago

8.8.1

3 years ago

8.8.0

3 years ago

8.6.0

3 years ago

8.5.3

3 years ago

8.5.2

4 years ago

8.5.1

4 years ago

8.5.0

4 years ago

8.4.6

4 years ago

8.4.5

4 years ago

8.4.4

4 years ago

8.4.3

4 years ago

8.4.2

4 years ago

8.4.1

4 years ago

8.4.0

4 years ago

8.3.4

4 years ago

8.2.2

4 years ago

8.1.2

4 years ago

8.3.3

4 years ago

8.3.2

4 years ago

8.2.1

4 years ago

8.3.1

4 years ago

8.3.0

4 years ago

8.2.0

4 years ago

8.1.1

4 years ago

8.1.0

4 years ago

8.0.1

4 years ago

8.0.0

4 years ago

7.7.0

5 years ago

7.6.1

5 years ago

7.6.0

5 years ago

7.5.14

5 years ago

7.5.13

5 years ago

7.5.12

5 years ago

7.5.11

5 years ago

7.5.10

5 years ago

7.5.9

5 years ago

7.5.8

5 years ago

7.5.7

5 years ago

7.5.6

5 years ago

7.5.5

5 years ago

7.5.4

5 years ago

7.5.3

5 years ago

7.5.2

5 years ago

7.5.1

5 years ago

7.5.0

5 years ago

7.5.0-alpha.0

5 years ago

7.4.1

5 years ago

7.4.0

6 years ago

7.3.1

6 years ago

7.3.0

6 years ago

7.2.1

6 years ago

7.2.0

6 years ago

7.1.8

6 years ago

7.1.7

6 years ago

7.1.6

6 years ago

7.1.5

6 years ago

7.1.4

7 years ago

7.1.3

7 years ago

7.1.2

7 years ago

7.1.1

7 years ago

7.1.0

7 years ago

7.0.4

7 years ago

7.0.3

7 years ago

7.0.2

7 years ago

7.0.1

7 years ago

7.0.0

7 years ago

6.5.11

7 years ago

6.5.10

7 years ago

6.5.9

8 years ago

6.5.8

8 years ago

6.5.7

8 years ago

6.5.6

8 years ago

6.5.5

8 years ago

6.5.4

8 years ago

6.5.3

8 years ago

6.5.2

8 years ago

6.5.1

8 years ago

6.5.0

8 years ago

6.4.5

8 years ago

6.4.4

8 years ago

6.4.3

8 years ago

6.4.2

8 years ago

6.4.1

8 years ago

6.4.0

8 years ago

6.3.0

8 years ago

6.2.3

8 years ago

6.2.2

8 years ago

6.2.1

8 years ago

6.2.0

8 years ago

6.1.1

8 years ago

6.1.0

8 years ago

6.0.8

8 years ago

6.0.7

8 years ago

6.0.6

9 years ago

6.0.5

9 years ago

6.0.4

9 years ago

6.0.3

9 years ago

6.0.2

9 years ago

6.0.1

9 years ago

6.0.0

9 years ago

6.0.0-beta.1

9 years ago

6.0.0-beta.0

9 years ago

5.4.0

9 years ago

5.3.4

9 years ago

5.3.3

9 years ago

5.3.2

9 years ago

5.3.1

9 years ago

5.3.0

9 years ago

5.2.2

9 years ago

5.2.1

9 years ago

5.2.0

9 years ago

5.1.1

9 years ago

5.1.0

9 years ago

5.0.3

9 years ago

5.0.2

9 years ago

5.0.1

9 years ago

5.0.0

9 years ago

4.5.0

9 years ago

4.4.1

9 years ago

4.4.0

9 years ago

4.3.5

9 years ago

4.3.4

9 years ago

4.3.3

9 years ago

4.3.2

9 years ago

4.3.1

9 years ago

4.3.0

9 years ago

4.2.0

9 years ago

4.1.3

9 years ago

4.1.2

9 years ago

4.1.1

9 years ago

4.1.0

9 years ago

4.0.7

9 years ago

4.0.6

10 years ago

4.0.5

10 years ago

4.0.4

10 years ago

4.0.3

10 years ago

4.0.2

10 years ago

4.0.1

10 years ago

4.0.0

10 years ago

3.0.0

10 years ago

2.1.0

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.0

10 years ago