提交 2ec3c37c 编写于 作者: Z ztplz 提交者: 偏右

Add bodyStyle for drawer

上级 0e1564f4
......@@ -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>
);
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册