Skip to content

Commit

Permalink
fix: 修改Demo的Modal的Button的显示方式,进行竖着排列
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoneybee committed Sep 3, 2020
1 parent 350ca92 commit 7bda389
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 36 deletions.
45 changes: 18 additions & 27 deletions components/modal/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -284,35 +284,26 @@ exports[`renders ./components/modal/demo/manual.md correctly 1`] = `
`;

exports[`renders ./components/modal/demo/modal-render.md correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
<div
class="ant-space-item"
style="margin-right:8px"
Array [
<button
class="ant-btn ant-btn-primary"
type="button"
>
<button
class="ant-btn ant-btn-primary"
type="button"
>
<span>
Custom modal content render
</span>
</button>
</div>
<div
class="ant-space-item"
<span>
Custom modal content render
</span>
</button>,
<br />,
<br />,
<button
class="ant-btn"
type="button"
>
<button
class="ant-btn"
type="button"
>
<span>
Open Draggable Modal
</span>
</button>
</div>
</div>
<span>
Open Draggable Modal
</span>
</button>,
]
`;

exports[`renders ./components/modal/demo/position.md correctly 1`] = `
Expand Down
18 changes: 9 additions & 9 deletions components/modal/demo/modal-render.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ title:
Custom modal content render. use `react-draggable` implements draggable.

```jsx
import { Modal, Button, Space } from 'antd';
import { Modal, Button } from 'antd';
import Draggable from 'react-draggable';

class App extends React.Component {
Expand Down Expand Up @@ -68,14 +68,14 @@ class App extends React.Component {
render() {
return (
<>
<Space>
<Button type="primary" onClick={this.showCustomRender}>
Custom modal content render
</Button>
<Button onClick={this.showModal}>
Open Draggable Modal
</Button>
</Space>
<Button type="primary" onClick={this.showCustomRender}>
Custom modal content render
</Button>
<br/>
<br/>
<Button onClick={this.showModal}>
Open Draggable Modal
</Button>
<Modal
title="Custom modal content render"
visible={this.state.customVisible}
Expand Down

0 comments on commit 7bda389

Please sign in to comment.