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

Update components to support both href and onClick #554

Merged
merged 7 commits into from
Mar 26, 2018

Conversation

chrisdavies
Copy link
Contributor

@chrisdavies chrisdavies commented Mar 21, 2018

Fixes #553 and Fixes #558

@chrisdavies chrisdavies requested a review from snide March 21, 2018 20:11
Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as advertised and the functionality seems fine. If this is the pattern we're going with can we...

  1. Update the docs to show a live example.
  2. Can be a seperate PR, but we should update all the button components to do the same, since right now they operate in the reverse and could probably accept both as well.

@snide
Copy link
Contributor

snide commented Mar 21, 2018

Also don't forget a changelog item.

@chrisdavies
Copy link
Contributor Author

Ah. I had failed to read the contributing guide for eui. Sorry about that!

@chrisdavies
Copy link
Contributor Author

Hm. Button does this slightly differently. Instead of checking if href is undefined, it checks if it's falsy. I don't know which is preferable. Thoughts?

@chrisdavies
Copy link
Contributor Author

FYI, hold off on reviewing until my next comment. I'm going to go ahead and make the button changes in this PR, since it makes some cleanup easier.

@chrisdavies chrisdavies changed the title Update link to support both href and onClick Update link to support both href and onClick. Fixes #558 Mar 22, 2018
@chrisdavies chrisdavies changed the title Update link to support both href and onClick. Fixes #558 Update link to support both href and onClick. Mar 22, 2018
@chrisdavies chrisdavies changed the title Update link to support both href and onClick. Update components to support both href and onClick Mar 26, 2018
@chrisdavies
Copy link
Contributor Author

I forgot to give the all-clear. This is once again ready for review!

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ok to me, tested it on all our button types. Thank you for adding it to the cards as well. Only rec might be to add some notes in the prop docs, but feel free to merge

image

@chrisdavies
Copy link
Contributor Author

@snide Thanks! I just took a look at the props. They don't seem to conflict with this change, but agree, in general, they're pretty sparse. I think I'll check this in, though.

@chrisdavies chrisdavies merged commit b01218a into elastic:master Mar 26, 2018
@chrisdavies chrisdavies deleted the flaw/eui-link-href-onclick branch March 26, 2018 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants