Skip to content

Commit

Permalink
Fixed #2404 - Add maskStyle property to Dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Nov 8, 2021
1 parent 8ab9fa4 commit 1699075
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/dialog/Dialog.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface DialogProps {
closable?: boolean;
style?: object;
className?: string;
maskStyle?: object;
maskClassName?: string;
showHeader?: boolean;
appendTo?: DialogAppendToType;
Expand Down
4 changes: 3 additions & 1 deletion src/components/dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class Dialog extends Component {
closable: true,
style: null,
className: null,
maskStyle: null,
maskClassName: null,
showHeader: true,
appendTo: null,
Expand Down Expand Up @@ -71,6 +72,7 @@ export class Dialog extends Component {
closable: PropTypes.bool,
style: PropTypes.object,
className: PropTypes.string,
maskStyle: PropTypes.object,
maskClassName: PropTypes.string,
showHeader: PropTypes.bool,
appendTo: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
Expand Down Expand Up @@ -657,7 +659,7 @@ export class Dialog extends Component {
};

return (
<div ref={(el) => this.mask = el} className={maskClassName} onClick={this.onMaskClick}>
<div ref={(el) => this.mask = el} style={this.props.maskStyle} className={maskClassName} onClick={this.onMaskClick}>
<CSSTransition nodeRef={this.dialogRef} classNames="p-dialog" timeout={transitionTimeout} in={this.state.visible} options={this.props.transitionOptions}
unmountOnExit onEnter={this.onEnter} onEntered={this.onEntered} onExiting={this.onExiting} onExited={this.onExited}>
<div ref={this.dialogRef} id={this.state.id} className={className} style={this.props.style} onClick={this.props.onClick}
Expand Down

0 comments on commit 1699075

Please sign in to comment.