Skip to content

Can we have a generic "button" component back? Or a pared down version? #1722

Description

@hross

I know this was just switched over and I don't know the behind the scenes reason, but... it was convenient to have a component. Here is an example scenario where I would like to have it:

We have a page where the primary and default button change depending on what actions the user takes (or has taken) on the page. Example: I vote, and the primary/default buttons swap based on my vote.

The problem with having separate components in React is that when we re-render after the user action we lose focus. The only way to fix this issue with the current design (that I am aware of) is to track focus in another component, re-set focus in the DOM, etc, etc. It seems messy and inconvenient when I really just want a button that is primary vs. default.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions