question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

==>

<Button icon="star">START</Button>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
hotoocommented, Mar 20, 2016

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

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

<Button>
  Next                <Icon type="right" />
</Button>
3reactions
plandemcommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pass icon button as props using react - Stack Overflow
I do not want to define icon buttons in the common component but pass it as props. Is it possible to pass such...
Read more >
IconButton API - Material UI - MUI
API reference docs for the React IconButton component. Learn about the props, CSS, and other APIs of this exported module.
Read more >
Button - React Native Elements
Buttons are touchable elements used to interact with the screen. They may display text, icons, or both. Buttons can be styled with several...
Read more >
IconButton class - material library - Flutter - Dart API docs
An icon button is a picture printed on a Material widget that reacts to ... icon buttons can be produced by configuring the...
Read more >
React Suite <IconButton> Props - GeeksforGeeks
It has an icon property that is used to specify the icon of the Button. IconButton Props: classPrefix: The prefix of the component...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found