Skip to content

Commit

Permalink
chore(Dialog): update code style
Browse files Browse the repository at this point in the history
  • Loading branch information
bindoon authored and 潕量 committed May 30, 2022
1 parent 266d55f commit e421fe2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/dialog/dialog-v2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const Dialog = props => {

const wrapperCls = classNames({
[`${prefix}overlay-wrapper`]: true,
[`${wrapperClassName}`]: !!wrapperClassName,
[wrapperClassName]: !!wrapperClassName,
opened: visible,
});
const dialogCls = classNames({
Expand All @@ -262,9 +262,9 @@ const Dialog = props => {
bottom && (topStyle.paddingBottom = bottom);
}

const nstyle = style || {};
if (overflowScroll && !nstyle.maxHeight) {
nstyle.maxHeight = `calc(100vh - ${top + bottom}px)`;
const innerStyle = style || {};
if (overflowScroll && !innerStyle.maxHeight) {
innerStyle.maxHeight = `calc(100vh - ${top + bottom}px)`;
}

const timeout = {
Expand All @@ -284,7 +284,7 @@ const Dialog = props => {
>
<Inner
{...others}
style={centered ? { ...topStyle, ...nstyle } : nstyle}
style={centered ? { ...topStyle, ...innerStyle } : innerStyle}
v2
ref={dialogRef}
prefix={prefix}
Expand Down

0 comments on commit e421fe2

Please sign in to comment.