Skip to content

Conversation

@grgr-dkrk
Copy link
Contributor

@grgr-dkrk grgr-dkrk commented Oct 10, 2021

What kind of change does this PR introduce?
Improve Types(ButtonGroup)

Did you add tests for your changes?
yes.

If relevant, did you update the documentation?
it is already exists.

Summary

  • The documentation says that ButtonGroup needs to specify {element: componentName} for buttons props, but TypeScript doesn't have that type, thus I added a type.
  • Several types in ButtonGroups have been improved.
  • Added a test case when buttons is entered in an array other than a string.

Does this PR introduce a breaking change?
no.

Other information
I was thinking the #3196 problem could be solved with {element: componentName}.
However, improving #3196 required modification of the parent component. This PR does not directly resolve it.

@netlify
Copy link

netlify bot commented Oct 10, 2021

✔️ Deploy Preview for react-native-elements canceled.

🔨 Explore the source changes: f9d6e0b

🔍 Inspect the deploy log: https://app.netlify.com/sites/react-native-elements/deploys/61e1363a1a7d30000773e4d8

@grgr-dkrk grgr-dkrk changed the title fix: impove types and add tests for ButtonGroup fix(ButtonGroup): impove types and add tests Oct 10, 2021
@grgr-dkrk grgr-dkrk changed the title fix(ButtonGroup): impove types and add tests fix(ButtonGroup): improve types and add tests Oct 10, 2021
@grgr-dkrk grgr-dkrk changed the title fix(ButtonGroup): improve types and add tests fix(ButtonGroup): add and improve types and add tests Oct 10, 2021
@arpitBhalla
Copy link
Member

Can you merge next ?

@codecov
Copy link

codecov bot commented May 21, 2022

Codecov Report

Merging #3220 (b7d371b) into next (65a1fa9) will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             next    #3220      +/-   ##
==========================================
+ Coverage   79.13%   79.24%   +0.11%     
==========================================
  Files          87       87              
  Lines        1807     1807              
  Branches      793      792       -1     
==========================================
+ Hits         1430     1432       +2     
+ Misses        370      369       -1     
+ Partials        7        6       -1     
Impacted Files Coverage Δ
packages/base/src/ButtonGroup/ButtonGroup.tsx 100.00% <100.00%> (+3.27%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@arpitBhalla arpitBhalla merged commit 9f08153 into react-native-elements:next May 21, 2022
github-actions bot pushed a commit that referenced this pull request May 21, 2022
Co-authored-by: Arpit Bhalla <55053424+arpitBhalla@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request May 21, 2022
Co-authored-by: Arpit Bhalla <55053424+arpitBhalla@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Closed or Merged 🏁

Development

Successfully merging this pull request may close these issues.

2 participants