feat: Add dimension prop to Combo
Description
Adds dimension prop to Combo which is passed on to Bar and Line
| Before | After |
|---|---|
|
|
Related Issue
https://github.com/adobe/react-spectrum-charts/issues/364
Motivation and Context
Provides a simpler API to set the common dimension of the Combo chart
How Has This Been Tested?
- Passed existing tests
- Updated tests to cover changes
Screenshots (if appropriate):
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] I have signed the Adobe Open Source CLA.
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING document.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
🎨 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-393
Can we skip coverage requirement for pseudo component?
You could do something like we have in Bar.test.tsx. You will see that the first test just renders the pseudo component. That is enough to count it as covered. If for some reason it isn't a react component, then that test would fail to render.
I would create a file called Combo.test.tsx in src/stories/components/Combo/ and add the test to that. Seems like a silly test but it does at least ensure that the component is a react component.
🎨 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-393
🎨 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-393
Thanks! Added the tests
🎨 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-393
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code