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 Lightbox srcSet prop type validation #209

Merged
merged 3 commits into from
Jul 18, 2018
Merged

Conversation

kripod
Copy link
Contributor

@kripod kripod commented Feb 12, 2018

Description of changes:

Fix Lightbox srcSet prop type validation

Related issues (if any):

#203

Checks:

  • Please confirm yarn run lint ran successfully
  • Please confirm that only /src and /examples/src are committed

src/Lightbox.js Outdated
@@ -375,7 +375,7 @@ Lightbox.propTypes = {
images: PropTypes.arrayOf(
PropTypes.shape({
src: PropTypes.string.isRequired,
srcSet: PropTypes.array,
srcSet: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
Copy link
Contributor

Choose a reason for hiding this comment

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

You could also use arrayOf(PropTypes.string) instead of PropTypes.array.

@kripod
Copy link
Contributor Author

kripod commented Mar 22, 2018

@jorrit Done, thank you for the tip!

@neptunian neptunian merged commit 6f333c8 into jossmac:master Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants