Skyscanner / backpack

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

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

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: BpkExtraLargeSpinner: 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-spinner/src/BpkExtraLargeSpinner.tsx:39:11)

Remember to include the following changes:

github-actions[bot] commented 2 months ago

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

github-actions[bot] commented 2 months ago

Visit https://backpack.github.io/storybook-prs/3586 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 15ca5de8f4bebba043030c0e05e477c95e8e93ad