mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
Add bodyStyle for drawer
This commit is contained in:
parent
0e1564f499
commit
2ec3c37c42
@ -24,6 +24,7 @@ export interface DrawerProps {
|
||||
mask?: boolean;
|
||||
maskStyle?: React.CSSProperties;
|
||||
style?: React.CSSProperties;
|
||||
bodyStyle?: React.CSSProperties;
|
||||
title?: React.ReactNode;
|
||||
visible?: boolean;
|
||||
width?: number | string;
|
||||
@ -182,7 +183,7 @@ class Drawer extends React.Component<DrawerProps & ConfigConsumerProps, IDrawerS
|
||||
|
||||
// render drawer body dom
|
||||
renderBody = () => {
|
||||
const { placement, prefixCls, visible } = this.props;
|
||||
const { bodyStyle, placement, prefixCls, visible } = this.props;
|
||||
if (this.destroyClose && !visible) {
|
||||
return null;
|
||||
}
|
||||
@ -211,7 +212,9 @@ class Drawer extends React.Component<DrawerProps & ConfigConsumerProps, IDrawerS
|
||||
onTransitionEnd={this.onDestroyTransitionEnd}
|
||||
>
|
||||
{this.renderHeader()}
|
||||
<div className={`${prefixCls}-body`}>{this.props.children}</div>
|
||||
<div className={`${prefixCls}-body`} style={bodyStyle}>
|
||||
{this.props.children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user