Skip to content

Commit

Permalink
fix(modal): when title large hidden close icon (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyFBB authored Sep 27, 2023
1 parent fe75511 commit dc86552
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
58 changes: 58 additions & 0 deletions components/modal/demo/largeTitle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
order: 6
title:
zh-CN: 超长 Title
---

## zh-CN

弹框中包含表格

```jsx
import { Modal, Button, Table } from 'antd';

class App extends React.Component {
state = { visible: false };

showModal = () => {
this.setState({
visible: true,
});
};

handleOk = e => {
console.log(e);
this.setState({
visible: false,
});
};

handleCancel = e => {
console.log(e);
this.setState({
visible: false,
});
};

render() {
return (
<div>
<Button type="primary" onClick={this.showModal}>
Open Modal
</Button>
<Modal
title="xixiixixixixiixxixiix超长名字嘻嘻超长名字嘻嘻超长名字嘻嘻超长名字嘻嘻超长名字嘻嘻"
width={520}
visible={this.state.visible}
onOk={this.handleOk}
onCancel={this.handleCancel}
>
内容
</Modal>
</div>
);
}
}

ReactDOM.render(<App />, mountNode);
```
1 change: 1 addition & 0 deletions theme/dt-theme/default/modal.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import "../const.less";

.ant-modal-title {
padding-right: 10px;
font-weight: 600;
}

Expand Down

0 comments on commit dc86552

Please sign in to comment.