🐛 Correct Drawer style

close #11504
This commit is contained in:
afc163 2018-12-20 17:26:34 +08:00
parent 1c02a65593
commit 1ac6b5782d
No known key found for this signature in database
GPG Key ID: 738F973FCE5C6B48

View File

@ -196,25 +196,20 @@ export default class Drawer extends React.Component<DrawerProps, IDrawerState> {
>
{header}
{closer}
<div className={`${prefixCls}-body`} style={this.props.style}>
{this.props.children}
</div>
<div className={`${prefixCls}-body`}>{this.props.children}</div>
</div>
);
};
getRcDrawerStyle = () => {
const { zIndex, placement, maskStyle } = this.props;
return this.state.push
? {
...maskStyle,
zIndex,
transform: this.getPushTransform(placement),
}
: {
...maskStyle,
zIndex,
};
const { zIndex, placement, maskStyle, style } = this.props;
const { push } = this.state;
return {
...maskStyle,
zIndex,
transform: push ? this.getPushTransform(placement) : undefined,
style,
};
};
// render Provider for Multi-level drawe