Skip to content

Button component #59

@SamusElderg

Description

@SamusElderg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions