octopusthink / nautilus

Inclusive, open-source design system and React component library.
https://nautilus.octopusthink.com
MIT License
2 stars 0 forks source link

feat: Use <a> tag by default in Link component #148

Closed tofumatt closed 5 years ago

tofumatt commented 5 years ago

Fix #147. Fix #135.

tofumatt commented 5 years ago

Hmm, I was trying out VSCode and looks like it doesn't allow me to create draft PRs that I could see.

At any rate this isn't quite ready, so you can ignore it for now 😄

tofumatt commented 5 years ago

I'd appreciate a review of what I've done so far here; I'm not quite sure if it's complete, but let me know if what's here so far makes sense and seems like a positive change 😄

tofumatt commented 5 years ago

One thing that I'm finding a bit confusing is the alternating use of to and href. Would it make sense to settle on a single convention here? That's the nature of the routing libraries vs an <a> tag I'm afraid, and I used to={} so people would see they can pass props down from our Link to the underlying router link okay. Essentially: href is for links not controlled by our router.

Being "smart" about that and combining those two props can break things or get pretty messy; I've tried it in the past. Best to just allow them to be separate.