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

[EnhancedButton] support composable anchor tag #2982

Closed
mbrookes opened this issue Jan 19, 2016 · 6 comments
Closed

[EnhancedButton] support composable anchor tag #2982

mbrookes opened this issue Jan 19, 2016 · 6 comments

Comments

@mbrookes
Copy link
Member

This would allow deprecation of linkButton and href props. EnhancedButton already supports <input>, but uses props to support anchor. This would also indirectly solve #1586.

(Arguably linkButton is already redundant - if href is set, then linkButton must be true.)

@mbrookes mbrookes changed the title [EnhancedButton] support composable anchor tag (<a href="">) [EnhancedButton] support composable anchor tag Jan 19, 2016
@mbrookes
Copy link
Member Author

mbrookes commented Feb 1, 2016

Seems this may already be possible (just not composable): #850 (comment). This is undocumented though.

@alitaheri
Copy link
Member

@mbrookes Actually we should remove that. if people want to tun it into a link, then they can just wrap the component around <a>.

@mbrookes
Copy link
Member Author

mbrookes commented Feb 1, 2016

I thought that when I was updating the docs, and tried to change the example in order to replace href and linkButton, butt doesn't work as expected - only the text within <a></a> is clickable (and is the wrong colour without additional styling) - hence this PR. 😄

@alitaheri
Copy link
Member

Oh... there's that -_- what about link? 😁 it takes a url and renders an <a> element. I understand the tenancy to use HTML attributes. an I think its better too, but href is used as a work around by some people, so i think we should deprecate it for the sake of better documentation of the expected behavior. we'll deprecate linkButton and href and document the expected caveat and behaviors of using link.

@mbrookes
Copy link
Member Author

So, we deprecated linkButton and just detect the href prop. @alitaheri I didn't quite follow what you were saying about link vs. href, but I'm going to close this issue for now and we can revisit for the reworked Button.

@alitaheri
Copy link
Member

Well since it would be a change in behavior. It would better have a new name. but since we're working on Button this is irrelevant now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants