-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Just collating some button component thoughts here whilst been playing with it recently in WMA and core app
Currently if you choose to use a href
it converts the button to a link
type.
This means these both dont apply:
disabled
onClick
A button definitely should have a disabled option available even if it points to a link, so we should change that to accommodate.
And there are reasons to include an onClick
along with a link, for instance if you need the app to do an action or change a state before routing to the linked page (especially for external links that open in a new page/tab)
We also dont handle internal links with the nextjs router, i wonder if we can drop the href
& external
options and have some kind of a linkElement
instead where we can hand in either <Link
or <a href
based on our needs?
Style updates: not sure if the Figma is behind or ahead of the current styling but looks like the padding is more narrow in Figma (which i feel would be an improvement) so might be a good opportunity to get the design aligned/refreshed while we consider/implement the above