Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why remove the <Icon/> component?🙏 #611

Open
ZenkieBear opened this issue Dec 26, 2023 · 2 comments
Open

Why remove the <Icon/> component?🙏 #611

ZenkieBear opened this issue Dec 26, 2023 · 2 comments

Comments

@ZenkieBear
Copy link

ZenkieBear commented Dec 26, 2023

English:
While ant design decided use SVG component instead of font icon, the Icon is used for some business!
It provide a way to render icon through the icon tag.
We have a business used this component like that.

We should keep Icon, but we can replace the implementation of icons.

Now the Icon throw an warning:

Warning: [antd-compatible: Icon] The legacy component has been deprecated, and ant design 4.0 now released! Please follow https://ant.design/components/icon to upgrade.

中文:
即便 ant design 决定使用 SVG 组件来代替字体图标,Icon 依然被使用在某些业务上!
它提供了一种方式通过图标标签(名称字符串)来渲染图标。
我们正有一个业务如此。

我们可以替换图标的实现方式,但是应该保留Icon组件。

现在我们的Icon会在控制台打印一条警告:

Warning: [antd-compatible: Icon] The legacy component has been deprecated, and ant design 4.0 now released! Please follow https://ant.design/components/icon to upgrade.
@ZenkieBear ZenkieBear changed the title Why remove the <Icon/> component? Why remove the <Icon/> component?🙏 Dec 26, 2023
@ZenkieBear
Copy link
Author

ZenkieBear commented Dec 26, 2023

English:
I don't know when it will be removed from antd, but it couldn't be found in 4.0's and 5.0's document.
If it removed, our team have to implement an icon-provider component which is familiar to Icon, that's redundant and unnecessary!

中文:
我不知道它什么时候会从 antd 中移除,但它已经无法从 4.0 和 5.0 的文档中找到了。
如果它被移除,我们的团队必须重新实现一个和 Icon 类似的 图标提供器 ,这是冗余而且没有必要的!

@ZenkieBear
Copy link
Author

In Font Awesome,there is a same provider named FontAwesomeIcon: https://fontawesome.com/docs/web/use-with/react/add-icons. And they implemented SVG icons.

在 Font Awesome,他们也有一个类似的提供器名为 FontAwesomeIcon,而且他们也实现了 SVG 图标。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant