practical-react-components icon indicating copy to clipboard operation
practical-react-components copied to clipboard

feat(button): danger and success variant

Open lekoaf opened this issue 4 years ago • 2 comments

Adds a "danger" variant which signifies a dangerous action, such as deleting a user.

Adds a "success" variant which signifies a positive action.

The change affects

  • Button
  • IconButton
  • IconTextButton

This change also affects a number of snapshots. This because a primary button uses textPrimary and elementPrimary to change the color between for instance the normal and hover state. textError and elementError however had the exact same color.

Had to add textSuccess since this color didn't exist at all, which seems like an error due to the fact that all other element... has an equivalent text....

prc_success_danger_button

lekoaf avatar Jun 10 '21 11:06 lekoaf

I'm not sure if adding a color is classified as a breaking change or not. Let me know please.

lekoaf avatar Jun 11 '21 20:06 lekoaf

Got some ideas how to refactor the repetitive CSS too, but thought I'd do that in a separate PR instead.

lekoaf avatar Jun 11 '21 20:06 lekoaf