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

fix: remove defaultProps and propTypes #1434

Merged
merged 5 commits into from
Sep 10, 2024

Conversation

haideralsh
Copy link
Contributor

Description

Fixes: #1433

Changes include

  • breaking change: a change that is not backwards-compatible and/or changes current functionality
  • fix: a non-breaking change that solves an issue
  • feature: a non-breaking change that adds functionality
  • chore: contains no changes affecting the library, such as documentation or test updates

Feature checklist

  • Appropriate tests have been added
  • Documentation has been updated
  • Accessibility has been considered

@haideralsh haideralsh force-pushed the remove-defaultProps-propTypes branch from 6e75771 to fd79f06 Compare September 6, 2024 20:40
@haideralsh haideralsh force-pushed the remove-defaultProps-propTypes branch 2 times, most recently from 38a434c to 120c9d5 Compare September 10, 2024 15:38
@haideralsh haideralsh force-pushed the remove-defaultProps-propTypes branch from 120c9d5 to 0533de2 Compare September 10, 2024 16:04

type Props = React.ComponentPropsWithRef<"li"> & SpaceProps & ColorProps & TypographyProps;

const ListItem = styled.li<Props>(space, color, typography, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missing DefaultProps

@@ -26,8 +26,20 @@ export type TooltipProps = {
children?: React.ReactNode;
};

const Tooltip: React.FC<React.PropsWithChildren<TooltipProps>> = React.forwardRef(
({ className, tooltip, maxWidth, children, placement, showDelay, hideDelay, defaultOpen }, ref) => (
const Tooltip = React.forwardRef<any, TooltipProps>(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replace any with ref type

@haideralsh haideralsh force-pushed the remove-defaultProps-propTypes branch from cb645c2 to 8214212 Compare September 10, 2024 18:59
@haideralsh haideralsh changed the title fix: remove defaultProps fix: remove defaultProps and PropTypes Sep 10, 2024
@haideralsh haideralsh changed the title fix: remove defaultProps and PropTypes fix: remove defaultProps and propTypes Sep 10, 2024
@haideralsh haideralsh force-pushed the remove-defaultProps-propTypes branch from 8214212 to 86c6f5e Compare September 10, 2024 19:12
@haideralsh haideralsh merged commit c38bfc6 into master Sep 10, 2024
5 checks passed
@haideralsh haideralsh deleted the remove-defaultProps-propTypes branch September 10, 2024 19:23
github-actions bot pushed a commit that referenced this pull request Sep 10, 2024
## [10.2.11](v10.2.10...v10.2.11) (2024-09-10)

### Bug Fixes

* remove defaultProps and propTypes ([#1434](#1434)) ([c38bfc6](c38bfc6))
Copy link

🎉 This PR is included in version 10.2.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DefaultProps and PropTypes are causing warnings in the console
1 participant