fix spark-react test errors by adding react component proptype #2237
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
We have been getting react test errors/warnings since the new docs site started. See below screenshot. I fixed this by researching and discovering a newer proptype that we should use going forward when we have a prop that can be of type react component. I left the old proptype values and added the new one. Leaving the old ones for now ensures that we don't have a breaking change. see: …facebook/prop-types#211 for more info
Associated Issue
Fixes #2238
This involves our react package and will be good to update that in the release notes when we launch that we added an additional proptype option of PropTypes.elementType to SprkLinks (element), SprkCardTeaser (ctaLinkElement, mediaLinkElement) and SprkMasthead (logoLinkElement).
Please check off completed items as you work.
If a checklist item or section does not apply to your PR
then please remove it.
Documentation
Code
gulp test-react
(100% coverage, 100% passing)Accessibility
Browser Testing (current version and 1 prior)