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

Button组件的icon属性,可否支持ReactNode类型? #18954

Closed
1 task
303394539 opened this issue Sep 23, 2019 · 1 comment
Closed
1 task

Button组件的icon属性,可否支持ReactNode类型? #18954

303394539 opened this issue Sep 23, 2019 · 1 comment
Assignees

Comments

@303394539
Copy link
Contributor

303394539 commented Sep 23, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

因为Icon组件支持createFromIconfontCN和scriptUrl参数,如果Button的icon属性支持ReactNode类型并能使用Icon,这样能增强Button的表现能力,不至于因为Icon不是antd包含的图标就需要开发者自己写一个按钮组件。

What does the proposed API look like?

<Button icon={< Icon type="Click" />}>Click

@shaodahong
Copy link
Member

换种方式

<Button><Icon type="Click" scriptUrl /></Button>

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

3 participants