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

Render icons in Button based on the type prop #541

Merged
merged 2 commits into from
Nov 22, 2019

Conversation

ashmaroli
Copy link
Member

Most of the buttons have their icons fixed for a given type to ease UX. For example, delete type buttons are always rendered with the trash icon, or the view buttons are always rendered with the eye icon and similarly the save buttons are always rendered with the save (floppy) icon.

So instead of having to repeatedly pass the icon-name as a prop for the same Button type, it is better if the Button component determined the icon based on the current type.

Nevertheless, the existing behavior of passing icon as a prop is still valid to allow rendering a variant of the button with a different icon if such a need arises.

@ashmaroli ashmaroli merged commit c955eb2 into jekyll:master Nov 22, 2019
@ashmaroli ashmaroli deleted the button-type-icon branch November 22, 2019 08:42
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

Successfully merging this pull request may close these issues.

2 participants