Skip to content

Conversation

@jshakes
Copy link
Contributor

@jshakes jshakes commented Aug 17, 2020

The Link component brings app-specific logic that belongs in qz.com only. It also means Prism has a dependency on react-router-dom. It is therefore not in the spirit of a platform-agnostic component library to keep the Link component in Prism.

This PR removes Link, and refactors the Button component to accommodate this change. Specifically, it replaces ButtonLink with ButtonLabel, a styled span that can be optionally wrapped in an a tag (or anything else) by the consumer.

This PR also:

  • Adds a boolean prop inline to control the behavior and appearance of the button. This is instead of having variant prop values such as primary, primary-inline, warning, warning-inline, etc.
  • Fixes button loading state includes button copy #22

@jshakes jshakes requested a review from chriszarate August 17, 2020 17:08
Copy link
Contributor

@chriszarate chriszarate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool!

@jshakes jshakes merged commit dbe45b5 into main Aug 17, 2020
@jshakes jshakes deleted the remove-link-component branch August 17, 2020 18:14
jesswray pushed a commit that referenced this pull request Aug 21, 2020
* remove Link from Callout story examples

* replace ButtonLink with ButtonLabel

* fix imports

* create inline prop for button

* update docs with info about ButtonLabel

* remove react-router-dom
Bhammy pushed a commit that referenced this pull request Oct 20, 2020
* remove Link from Callout story examples

* replace ButtonLink with ButtonLabel

* fix imports

* create inline prop for button

* update docs with info about ButtonLabel

* remove react-router-dom
adamhooper added a commit that referenced this pull request Aug 23, 2021
It's used all over qz-react. It was removed in #24 without any
explanation. Seems like an oversight.
adamhooper added a commit that referenced this pull request Aug 24, 2021
It's used all over qz-react. It was removed in #24 without explanation. Seems like an oversight.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

button loading state includes button copy

3 participants