mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
Fixing style errors caused by too low height
This commit is contained in:
parent
78e8ab55b5
commit
c8217e0bad
@ -58,6 +58,11 @@ class App extends React.Component {
|
||||
onClose={this.onClose}
|
||||
maskClosable={false}
|
||||
visible={this.state.visible}
|
||||
style={{
|
||||
height: 'calc(100% - 55px)',
|
||||
overflow: 'auto',
|
||||
paddingBottom: 53,
|
||||
}}
|
||||
>
|
||||
<Form layout="vertical" hideRequiredMark>
|
||||
<Row gutter={16}>
|
||||
@ -159,6 +164,7 @@ class App extends React.Component {
|
||||
padding: '10px 16px',
|
||||
textAlign: 'right',
|
||||
left: 0,
|
||||
background: '#fff',
|
||||
borderRadius: '0 0 4px 4px',
|
||||
}}
|
||||
>
|
||||
|
@ -76,7 +76,8 @@ export default class Drawer extends React.Component<
|
||||
}
|
||||
|
||||
renderBody = () => {
|
||||
if (this.props.destroyOnClose && !this.props.visible) {
|
||||
const { destroyOnClose , visible, width, placement } = this.props;
|
||||
if (destroyOnClose && !visible) {
|
||||
return null;
|
||||
}
|
||||
const { prefixCls, title, closable } = this.props;
|
||||
@ -100,7 +101,14 @@ export default class Drawer extends React.Component<
|
||||
</button>
|
||||
);
|
||||
}
|
||||
const containerStyle = { width: this.props.width };
|
||||
let containerStyle: React.CSSProperties = { width };
|
||||
if (placement === 'left' || placement === 'right') {
|
||||
containerStyle = {
|
||||
overflow: 'auto',
|
||||
height: '100%',
|
||||
width,
|
||||
};
|
||||
}
|
||||
return (
|
||||
<div style={containerStyle}>
|
||||
{header}
|
||||
|
Loading…
Reference in New Issue
Block a user