Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- solve the problem of bundle size.
- Create a separated component for every single icon
- import StarFilled from 'antd/icons/StarFilled';
- <StarFilled />
- Deprecate reference a icon as a string
- A deprecated warning will show when you reference an icon as a string in the following components:
- <Icon type="star" />
- <Alert iconType="success" />
- <Avatar icon="star" />
- <Button icon="star" />
- Modal.confirm({ iconType: 'star' })
- For compatibility, we'll load an SVG sprite on demand when you reference an icon as a string.
- Instead of referencing an icon as a string, you should pass ReactNode explicitly to these props:
- import StarFilled from 'antd/icons/StarFilled';
- <Avatar icon={<StarFilled />} />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement