Browse Source

fix: icon error

pull/19837/head
ycjcl868 5 years ago
committed by GitHub Action
parent
commit
55e34f6ac1
  1. 10
      components/button/demo/button-group.md
  2. 4
      components/form/demo/form-context.md

10
components/button/demo/button-group.md

@ -19,7 +19,7 @@ The `size` can be set to `large`, `small` or left unset resulting in a default s
```jsx
import { Button } from 'antd';
import { Left, Right } from '@ant-design/icons';
import { Left, Right, Cloud, CloudDownload } from '@ant-design/icons';
const ButtonGroup = Button.Group;
@ -53,12 +53,12 @@ ReactDOM.render(
</Button>
</ButtonGroup>
<ButtonGroup>
<Button type="primary" icon="cloud" />
<Button type="primary" icon="cloud-download" />
<Button type="primary" icon={<Cloud />} />
<Button type="primary" icon={<CloudDownload />} />
</ButtonGroup>
<ButtonGroup>
<Button type="primary" size="small" icon="cloud" />
<Button type="primary" size="small" icon="cloud-download" />
<Button type="primary" size="small" icon={<Cloud />} />
<Button type="primary" size="small" icon={<CloudDownload />} />
</ButtonGroup>
</div>,
mountNode,

4
components/form/demo/form-context.md

@ -15,7 +15,7 @@ Use `Form.Provider` to process data between forms. In this case, submit button i
```tsx
import { Form, Input, InputNumber, Modal, Button, Avatar, Typography } from 'antd';
import { Smile } from '@ant-design/icons';
import { Smile, User } from '@ant-design/icons';
const layout = {
labelCol: { span: 8 },
@ -96,7 +96,7 @@ const Demo = () => {
<ul>
{users.map((user, index) => (
<li key={index} className="user">
<Avatar icon="user" />
<Avatar icon={<User />} />
{user.name} - {user.age}
</li>
))}

Loading…
Cancel
Save