LeonardoGentile / react-mobx-router5

React components for routing solution using router5 and mobx
MIT License
59 stars 5 forks source link

support for disabled attribute in BaseLink #2

Closed tinchoz49 closed 7 years ago

tinchoz49 commented 7 years ago

Hi @LeonardoGentile !

Can we have support for the disabled attribute in BaseLink, so I can disable the Link components when i'm submitting a form for example.

LeonardoGentile commented 7 years ago

Hello @tinchoz49, as I could read here: https://dev.w3.org/html5/html-author/#the-a-element and here: https://www.w3.org/TR/html401/struct/links.html#h-12.2 it seems like disabled is not a valid html attribute. Why don't you just pass a css class taking care of enabling/disabling the link?

tinchoz49 commented 7 years ago

It's true, it doesn't work like the button element. I don't know what I was thinking, thanks for the quick response, I will disable it with a css class.