Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LOOM-1363][BpkButton]: Refactor BpkButtonV1 #3443

Merged
merged 5 commits into from May 15, 2024
Merged

[LOOM-1363][BpkButton]: Refactor BpkButtonV1 #3443

merged 5 commits into from May 15, 2024

Conversation

mungodewar
Copy link
Contributor

@mungodewar mungodewar commented May 13, 2024

  • Remove some layers of abstraction from BpkButton & simplify
  • Add BpkButton (V1) visual tests
  • Convert BpkButton examples to TS

Remember to include the following changes:

  • Ensure the PR title includes the name of the component you are changing so it's clear in the release notes for consumers of the changes in the version e.g [KOA-123][BpkButton] Updating the colour
  • README.md (If you have created a new component)
  • Component README.md
  • Tests
  • Storybook examples created/updated
  • For breaking changes or deprecating components/properties, migration guides added to the description of the PR. If the guide has large changes, consider creating a new Markdown page inside the component's docs folder and link it here

@mungodewar mungodewar added the minor Non breaking change label May 13, 2024
Copy link

Visit https://backpack.github.io/storybook-prs/3443 to see this build running in a browser.

Copy link

Warnings
⚠️

Package source files (e.g. packages/package-name/src/Component.tsx) were updated, but type files weren't. Have you checked that no types have changed?

Browser support

If this is a visual change, make sure you've tested it in multiple browsers.

Generated by 🚫 dangerJS against 78a4d99

@mungodewar
Copy link
Contributor Author

Approved visual changes (adding new VT for Button V1)

@mungodewar mungodewar marked this pull request as ready for review May 13, 2024 13:16
Copy link

Visit https://backpack.github.io/storybook-prs/3443 to see this build running in a browser.

Copy link

Visit https://backpack.github.io/storybook-prs/3443 to see this build running in a browser.


export { default } from './src/BpkButtonLinkOnDark';
const BpkButtonPrimary = (props: Props) => <BpkButton {...props} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Here if it's not defined the default is bpk-button should it be PrimaryOnLight? or is default === primary ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Logic taken from:
Screenshot 2024-05-14 at 16 15 19


import BpkButton, {type Props} from './src/BpkButton';

const BpkButtonPrimaryOnLight = (props: Props) => <BpkButton {...props} primaryOnLight />
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this is definitely primaryOnLight 😅

Copy link
Contributor

@metalix2 metalix2 left a comment

Choose a reason for hiding this comment

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

Looks good

@mungodewar mungodewar merged commit c2da326 into main May 15, 2024
17 checks passed
@mungodewar mungodewar deleted the loom-1363 branch May 15, 2024 10:49
FireRedNinja pushed a commit that referenced this pull request May 22, 2024
* remove button layers of abstraction

* remove dummy fn

* move tests, move proptypes back

* add v1 visual stories, add cssModules to basebutton, update snaps
KathyWang0208 pushed a commit that referenced this pull request May 27, 2024
* remove button layers of abstraction

* remove dummy fn

* move tests, move proptypes back

* add v1 visual stories, add cssModules to basebutton, update snaps
KathyWang0208 pushed a commit that referenced this pull request May 27, 2024
* remove button layers of abstraction

* remove dummy fn

* move tests, move proptypes back

* add v1 visual stories, add cssModules to basebutton, update snaps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Non breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants