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

Remove usage of deprecated React API #1414

Merged
merged 2 commits into from
May 15, 2024
Merged

Remove usage of deprecated React API #1414

merged 2 commits into from
May 15, 2024

Conversation

buberdds
Copy link
Contributor

@buberdds buberdds commented May 14, 2024

Fixes #1410

  • needed for incoming version of React
  • removed a few buttons from Storybook as they are regular MUI buttons

Copy link

github-actions bot commented May 14, 2024

Deployed to Cloudflare Pages

Latest commit: 67c65494bc08b27fc6459495ee986cae630727f0
Status:✅ Deploy successful!
Preview URL: https://81151b39.oasis-explorer.pages.dev

Copy link
Collaborator

@lubej lubej left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +94 to +96
export const SearchButton = (props: ButtonProps & SearchButtonProps) => (
<StyledSearchButton variant="contained" color="primary" {...props} />
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would rather see something like this:

Suggested change
export const SearchButton = (props: ButtonProps & SearchButtonProps) => (
<StyledSearchButton variant="contained" color="primary" {...props} />
)
const PlainTextButton = ({variant = 'text', color: 'inherit', ...restProps}: ButtonProps) => (
<StyledPlainTextButton variant={variant} color={color} {...restProps} />
)

But not a big deal.

Copy link
Member

Choose a reason for hiding this comment

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

I vote for original

Copy link
Member

Choose a reason for hiding this comment

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

some hope for a nicer solution in the future emotion-js/emotion#2573 (comment)

@buberdds buberdds merged commit 5ed9ae3 into master May 15, 2024
8 checks passed
@buberdds buberdds deleted the mz/defaultProps branch May 15, 2024 08:37
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.

Refactor usage of React deprecated API
3 participants