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

feat(components): forward custom props on all components #553

Merged
merged 10 commits into from
Mar 24, 2020

Conversation

connor-baer
Copy link
Member

@connor-baer connor-baer commented Mar 21, 2020

Closes #527.

Purpose

Functional and class components should forward any additional props to their outermost child component. This is important for data-testids and custom styles using Emotion's styled function.

Approach and changes

  • capture all additional props and spread them on a component's outermost child node

Definition of done

  • Development completed
  • Reviewers assigned
  • Unit and integration tests
  • Meets minimum browser support
  • Meets accessibility requirements

@connor-baer connor-baer added the feature A new feature or enhancement label Mar 21, 2020
@connor-baer connor-baer requested review from glemmal and larimaza March 21, 2020 06:07
@codecov
Copy link

codecov bot commented Mar 21, 2020

Codecov Report

Merging #553 into alpha will decrease coverage by <.01%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##            alpha     #553      +/-   ##
==========================================
- Coverage   93.09%   93.08%   -0.01%     
==========================================
  Files         154      154              
  Lines        2462     2459       -3     
  Branches      687      691       +4     
==========================================
- Hits         2292     2289       -3     
  Misses        139      139              
  Partials       31       31
Impacted Files Coverage Δ
...onents/Table/components/TableHeader/TableHeader.js 100% <ø> (ø) ⬆️
...c/components/Sidebar/components/NavItem/NavItem.js 100% <ø> (ø) ⬆️
src/components/Modal/Modal.js 100% <ø> (ø) ⬆️
src/components/Pagination/Pagination.js 96.42% <ø> (ø) ⬆️
src/components/Table/Table.js 94.87% <ø> (ø) ⬆️
src/components/Popover/Popover.js 93.22% <ø> (ø) ⬆️
src/components/Portal/Portal.js 5.88% <0%> (ø) ⬆️
...nents/Button/components/PlainButton/PlainButton.js 100% <100%> (ø) ⬆️
...s/Button/components/RegularButton/RegularButton.js 100% <100%> (ø) ⬆️
src/components/Hamburger/Hamburger.js 95.65% <100%> (ø) ⬆️
... and 10 more

@vercel
Copy link

vercel bot commented Mar 21, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/sumup-oss/circuit-ui/g4pj60v74
✅ Preview: https://circuit-ui-git-feature-forward-props.sumup-oss.now.sh

@connor-baer connor-baer changed the title Forward custom props on all components feat(components): forward custom props on all components Mar 21, 2020
@connor-baer connor-baer linked an issue Mar 21, 2020 that may be closed by this pull request
@connor-baer connor-baer added this to the v2.0 milestone Mar 21, 2020
Copy link
Contributor

@larimaza larimaza left a comment

Choose a reason for hiding this comment

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

NOICE

@connor-baer
Copy link
Member Author

@larimaza TOIT

@connor-baer connor-baer merged commit c21311e into alpha Mar 24, 2020
@connor-baer connor-baer deleted the feature/forward-props branch March 24, 2020 21:09
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.0-alpha.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2020

🎉 This PR is included in version 2.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

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
feature A new feature or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow custom props on all components
2 participants