Skip to content

Commit

Permalink
fix: modal add dialogStyle dialogClass #2285
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed May 24, 2020
1 parent ffc002f commit 1410dee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion antdv-demo
6 changes: 4 additions & 2 deletions components/vc-dialog/Dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ export default {
visible,
bodyProps,
forceRender,
dialogStyle,
dialogClass,
} = this;
const dest = {};
const dest = { ...dialogStyle };
if (width !== undefined) {
dest.width = typeof width === 'number' ? `${width}px` : width;
}
Expand Down Expand Up @@ -276,7 +278,7 @@ export default {
role="document"
ref="dialog"
style={style}
class={cls}
class={[cls, dialogClass]}
forceRender={forceRender}
onMousedown={this.onDialogMouseDown}
>
Expand Down
2 changes: 1 addition & 1 deletion components/vc-dialog/IDialogPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function IDialogPropTypes() {
wrapProps: PropTypes.any,
getContainer: PropTypes.any,
dialogStyle: PropTypes.object.def(() => ({})),
dialogClass: PropTypes.object.def(() => ({})),
dialogClass: PropTypes.object.def(''),
closeIcon: PropTypes.any,
forceRender: PropTypes.bool,
getOpenCount: PropTypes.func,
Expand Down

0 comments on commit 1410dee

Please sign in to comment.