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 ```jsx
import { Button } from 'antd'; import { Button } from 'antd';
import { Left, Right } from '@ant-design/icons'; import { Left, Right, Cloud, CloudDownload } from '@ant-design/icons';
const ButtonGroup = Button.Group; const ButtonGroup = Button.Group;
@ -53,12 +53,12 @@ ReactDOM.render(
</Button> </Button>
</ButtonGroup> </ButtonGroup>
<ButtonGroup> <ButtonGroup>
<Button type="primary" icon="cloud" /> <Button type="primary" icon={<Cloud />} />
<Button type="primary" icon="cloud-download" /> <Button type="primary" icon={<CloudDownload />} />
</ButtonGroup> </ButtonGroup>
<ButtonGroup> <ButtonGroup>
<Button type="primary" size="small" icon="cloud" /> <Button type="primary" size="small" icon={<Cloud />} />
<Button type="primary" size="small" icon="cloud-download" /> <Button type="primary" size="small" icon={<CloudDownload />} />
</ButtonGroup> </ButtonGroup>
</div>, </div>,
mountNode, 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 ```tsx
import { Form, Input, InputNumber, Modal, Button, Avatar, Typography } from 'antd'; 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 = { const layout = {
labelCol: { span: 8 }, labelCol: { span: 8 },
@ -96,7 +96,7 @@ const Demo = () => {
<ul> <ul>
{users.map((user, index) => ( {users.map((user, index) => (
<li key={index} className="user"> <li key={index} className="user">
<Avatar icon="user" /> <Avatar icon={<User />} />
{user.name} - {user.age} {user.name} - {user.age}
</li> </li>
))} ))}

Loading…
Cancel
Save