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

Add LinkButton #201

Closed
vipentti opened this issue Aug 21, 2016 · 1 comment
Closed

Add LinkButton #201

vipentti opened this issue Aug 21, 2016 · 1 comment

Comments

@vipentti
Copy link
Collaborator

vipentti commented Aug 21, 2016

This recently came up with trying to implement https://vipentti.github.io/elm-mdl-dashboard/ 's View Source button.

In the actual MDL template the View Source button is technically Material button but it is a link-element (a).

Now I am uncertain if there is an actual need for this as you can somewhat work around this issue (opening a link) either by using Ports (required if you need to open the link in a new tab using window.open to emulate target = "_blank") or for example Navigation.newUrl.

Basically this would be a Button in all ways except the button -element would be swapped to a and some additional attributes added: href and target at least.

NOTE This not strictly specified in either MDL and Material Spec. However, MDL allows this as it uses CSS classes and Material Spec does not take into account the type of the element, as long as it is a button which this technically still is, only the Html element is changed but the functionality is not.

@debois debois closed this as completed Aug 21, 2016
@debois debois reopened this Aug 21, 2016
@debois
Copy link
Owner

debois commented Aug 21, 2016

(Misclick, sorry.)

vipentti added a commit to vipentti/elm-mdl that referenced this issue Sep 11, 2016
This resolves debois#201. The implementation was simplified in a large way
with debois#213.
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

2 participants