mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 04:30:06 +08:00
docs: optimize modal docs (#25724)
* docs: optimize modal docs * docs: remove <br />
This commit is contained in:
parent
da25fd1b38
commit
453f7d13f3
@ -241,24 +241,34 @@ exports[`renders ./components/modal/demo/info.md correctly 1`] = `
|
||||
`;
|
||||
|
||||
exports[`renders ./components/modal/demo/locale.md correctly 1`] = `
|
||||
<div>
|
||||
<button
|
||||
class="ant-btn ant-btn-primary"
|
||||
type="button"
|
||||
<div
|
||||
class="ant-space ant-space-horizontal ant-space-align-center"
|
||||
>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="margin-right:8px"
|
||||
>
|
||||
<span>
|
||||
Modal
|
||||
</span>
|
||||
</button>
|
||||
<br />
|
||||
<button
|
||||
class="ant-btn"
|
||||
type="button"
|
||||
<button
|
||||
class="ant-btn ant-btn-primary"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Modal
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
>
|
||||
<span>
|
||||
Confirm
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
class="ant-btn"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Confirm
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
@ -62,9 +62,3 @@ class App extends React.Component {
|
||||
|
||||
ReactDOM.render(<App />, mountNode);
|
||||
```
|
||||
|
||||
<style>
|
||||
.ant-modal p {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
|
@ -14,7 +14,7 @@ title:
|
||||
To customize the text of the buttons, you need to set `okText` and `cancelText` props.
|
||||
|
||||
```jsx
|
||||
import { Modal, Button } from 'antd';
|
||||
import { Modal, Button, Space } from 'antd';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
||||
|
||||
class LocalizedModal extends React.Component {
|
||||
@ -66,11 +66,10 @@ function confirm() {
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
<div>
|
||||
<Space>
|
||||
<LocalizedModal />
|
||||
<br />
|
||||
<Button onClick={confirm}>Confirm</Button>
|
||||
</div>,
|
||||
</Space>,
|
||||
mountNode,
|
||||
);
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user