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 spark-react test errors by adding react component proptype #2237

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion react/src/base/links/SprkLink.js
Expand Up @@ -90,7 +90,11 @@ SprkLink.propTypes = {
/** The href value for the link. */
href: PropTypes.string,
/** The element that will be rendered. */
element: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
element: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
PropTypes.elementType
]),
/** The event that will fire when the element is clicked. */
onClick: PropTypes.func,
};
Expand Down
Expand Up @@ -207,15 +207,23 @@ SprkCardTeaser.propTypes = {
additionalCtaIconClasses: PropTypes.string,
ctaAnalytics: PropTypes.string,
ctaIcon: PropTypes.string,
ctaLinkElement: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
ctaLinkElement: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
PropTypes.elementType
]),
ctaVariant: PropTypes.oneOf(['link', 'button']),
href: PropTypes.string,
text: PropTypes.string,
}),
media: PropTypes.shape({
additionalMediaIconClasses: PropTypes.string,
href: PropTypes.string,
mediaLinkElement: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
mediaLinkElement: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
PropTypes.elementType
]),
iconName: PropTypes.string,
imgAlt: PropTypes.string,
imgSrc: PropTypes.string,
Expand Down
6 changes: 5 additions & 1 deletion react/src/components/masthead/SprkMasthead.js
Expand Up @@ -323,7 +323,11 @@ SprkMasthead.propTypes = {
/** The href to render for the logo link. */
logoLink: PropTypes.string,
/** The element link element to render for the logo. */
logoLinkElement: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
logoLinkElement: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
PropTypes.elementType
]),
/** Expects a component to render the nav link. */
navLink: PropTypes.node,
};
Expand Down