Skip to content

Fix Badge's size default prop #1212

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

Merged
merged 3 commits into from
Mar 4, 2021
Merged

Fix Badge's size default prop #1212

merged 3 commits into from
Mar 4, 2021

Conversation

ethanshar
Copy link
Collaborator

Description

There was an issue with Badge's defaultProps that contained a default value for size prop.
Because we have a default value, we declare the prop to not be optional.
But it causes issues in other places that depends on BadgeProps
for example, an Avatar component has badge prop and its type is BadgeProps, but it doesn't know that size has a default value and it throws TS error that it is required (even though it's not)

Changelog

Fix Badge's size default prop and make it optional

@lidord-wix lidord-wix merged commit eccce40 into master Mar 4, 2021
M-i-k-e-l added a commit that referenced this pull request Mar 8, 2021
…alue-change

* master:
  Fix Badge's size default prop (#1212)
  Fix RadioGroup typings to extend our ViewProps and not React Native's
@ethanshar ethanshar deleted the fix/BadgeDefaultSizeProp branch July 26, 2021 09:08
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.

2 participants