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: correct Chip component typings #1044

Merged
merged 1 commit into from
May 8, 2019

Conversation

mikestone14
Copy link
Contributor

Motivation

As of version 2.15.2 the Chip component accepts the prop selectedColor
which it defines as an optional string prop. Though this change was
introduced to the Chip component itself, the typings for the component
were not updated which causes Typescript to complain when using the
selectedColor prop. This change adds the missing type to appease
Typescript.

Test plan

The change to __ts-tests__/Chip.test.tsx exposes the issue described in the "Motivation" section. Tests pass with the change to typings/components/Chip.d.ts and fail without them. There are no visual changes associated with this change.

As of version 2.15.2 the Chip component accepts the prop `selectedColor`
which it defines as an optional string prop. Though this change was
introduced to the Chip component itself, the typings for the component
were not updated which causes Typescript to complain when using the
`selectedColor` prop. This change adds the missing type to appease
Typescript.
@callstack-bot
Copy link

Hey @mikestone14, thank you for your pull request 🤗. The documentation from this branch can be viewed here. Please remember to update Typescript types if you changed API.

@mikestone14
Copy link
Contributor Author

cc @lukewalczak since it looks like you added the prop initially.

@raajnadar raajnadar merged commit 7085252 into callstack:master May 8, 2019
iyadthayyil pushed a commit to iyadthayyil/react-native-paper that referenced this pull request Jun 6, 2019
As of version 2.15.2 the Chip component accepts the prop `selectedColor`
which it defines as an optional string prop. Though this change was
introduced to the Chip component itself, the typings for the component
were not updated which causes Typescript to complain when using the
`selectedColor` prop. This change adds the missing type to appease
Typescript.
Trancever pushed a commit that referenced this pull request Jun 27, 2019
As of version 2.15.2 the Chip component accepts the prop `selectedColor`
which it defines as an optional string prop. Though this change was
introduced to the Chip component itself, the typings for the component
were not updated which causes Typescript to complain when using the
`selectedColor` prop. This change adds the missing type to appease
Typescript.
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.

None yet

4 participants