Skyscanner / backpack

Backpack Design System for the Web
https://skyscanner.design
Apache License 2.0
497 stars 186 forks source link

[NO JIRA][BpkLoadingButton]: Updating TS types and removing propTypes ahead of React 18 #3588

Closed olliecurtis closed 2 months ago

olliecurtis commented 2 months ago

As part of the migration to React 18 when running tests we found errors that were being through due to the mix of TS types and and propTypes which are deprecated and discouraged since React 17

console.error
    Warning: BpkLoadingButton: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
        at className (/Users/olivercurtis/Documents/Backpack/backpack/packages/bpk-component-loading-button/src/BpkLoadingButton.tsx:39:11)

Remember to include the following changes:

github-actions[bot] commented 2 months ago

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

github-actions[bot] commented 2 months ago
Warnings
:warning: 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 :no_entry_sign: dangerJS against f3bf3e05f4863c4091fd449666010742a13ca2fc

github-actions[bot] commented 2 months ago

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

github-actions[bot] commented 2 months ago

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