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

EuiButton, EuiButtonEmpty and EuiButtonIcon can now take an HREF #316

Merged
merged 4 commits into from
Jan 18, 2018

Conversation

snide
Copy link
Contributor

@snide snide commented Jan 18, 2018

Closes #24

Used a pattern @cjcenizal used in KUI. Moved the function to a new folder of /services/prop-types/ since we'll likely have more of these kind of reusable prop checks in the future.

image

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Nice! Just had a few really minor comments.

CHANGELOG.md Outdated
@@ -1,6 +1,10 @@
# [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `0.0.13`.
- EuiButton, EuiButtonEmpty and EuiButtonIcon can now take an HREF [(#316)](https://github.com/elastic/eui/pull/316)
Copy link
Contributor

Choose a reason for hiding this comment

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

Small nit: can we change "HREF" to be:

`href`

(using back ticks for code-formatting)

@@ -32,6 +33,15 @@ const iconSideToClassNameMap = {

export const ICON_SIDES = Object.keys(iconSideToClassNameMap);

// const checkHrefAndOnClick = (props, propName, componentName) => {
Copy link
Contributor

@cjcenizal cjcenizal Jan 18, 2018

Choose a reason for hiding this comment

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

"Kiiiiillll... meeeeee......" - this code

if (href) {
return (
<a
disabled={isDisabled}
Copy link
Contributor

Choose a reason for hiding this comment

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

According to googles, disabled isn't a valid attribute on anchor tags.

if (href) {
return (
<a
disabled={isDisabled}
Copy link
Contributor

Choose a reason for hiding this comment

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

Here too

if (href) {
return (
<a
disabled={isDisabled}
Copy link
Contributor

Choose a reason for hiding this comment

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

Here too

@snide
Copy link
Contributor Author

snide commented Jan 18, 2018

Feedback addressed. Gonna wait for tests to pass then I'll merge.

@snide
Copy link
Contributor Author

snide commented Jan 18, 2018

jenkins, test this

@snide
Copy link
Contributor Author

snide commented Jan 18, 2018

Looks like we're still having build problems on github. Merging this though because it's fairly simple / tested locally.

@snide snide merged commit 687cfab into elastic:master Jan 18, 2018
@snide snide deleted the buttonlinks branch January 18, 2018 21:03
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