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 prop #1199

Closed
afc163 opened this issue Mar 15, 2016 · 10 comments
Closed

Button icon prop #1199

afc163 opened this issue Mar 15, 2016 · 10 comments

Comments

@afc163
Copy link
Member

afc163 commented Mar 15, 2016

<Button>
  <Icon type="star" />START
</Button>

==>

<Button icon="star">START</Button>
@afc163 afc163 mentioned this issue Mar 17, 2016
21 tasks
@plandem
Copy link
Contributor

plandem commented Mar 19, 2016

I would like to have same for TabPane.

@hotoo
Copy link
Contributor

hotoo commented Mar 20, 2016

I think Button > Icon[type] is good enough.

<Button>
  <Icon type="star" />                Star
</Button>

<Button>
  Next                <Icon type="right" />
</Button>

@plandem
Copy link
Contributor

plandem commented Mar 20, 2016

if you are going to add 'icon' prop to Button, then probably it will be also a good idea to add it to other components - e.g. tabs. But i'm fine with current way - less to learn, lower learning curve => more users.

@afc163
Copy link
Member Author

afc163 commented Mar 25, 2016

Just for Button because I like it. 👽

@afc163 afc163 closed this as completed Mar 25, 2016
afc163 added a commit that referenced this issue Mar 25, 2016
@afc163
Copy link
Member Author

afc163 commented Mar 25, 2016

You guys can still use nested Icon.

@plandem
Copy link
Contributor

plandem commented Mar 25, 2016

please add to Tabs, because right now i have to use callback to render titles with icons.

@afc163
Copy link
Member Author

afc163 commented Mar 25, 2016

<TabPane tab=<span><Icon type="xx" />tab 2</span> key="2">
  second
</TabPane>

Why callback?

@plandem
Copy link
Contributor

plandem commented Mar 25, 2016

because it's ugly and much more worse than was with Button.
Button was:

<Button><Icon type="xx"/>title</Button>

Button now:

<Button icon="xx">title</Button>

Tab now:

<TabPane tab=<span><Icon type="xx" />title</span>>
  second
</TabPane>

Tab can be:

<TabPane tab="title" icon=""xx">
  second
</TabPane>

As i said - your addition about icon would be better for tabs, than for buttons.

@afc163
Copy link
Member Author

afc163 commented Mar 25, 2016

Ok, I consider it. Maybe you can give me a PR~

@lock
Copy link

lock bot commented May 6, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants