Skip to content

Commit

Permalink
chore: use PropTypes.shape rather than PropTypes.objectOf
Browse files Browse the repository at this point in the history
  • Loading branch information
frederickfogerty committed Aug 5, 2021
1 parent eae616d commit ea362fe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/react-imgix.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { config } from "./common";
import { PACKAGE_VERSION } from "./constants";
import constructUrl, {
compactParamKeys,
extractClientAndPathComponents,
extractClientAndPathComponents
} from "./constructUrl";
import extractQueryParams from "./extractQueryParams";
import { ShouldComponentUpdateHOC } from "./HOCs";
Expand Down Expand Up @@ -45,7 +45,7 @@ const SHARED_IMGIX_AND_SOURCE_PROP_TYPES = Object.assign(
width: PropTypes.number,
height: PropTypes.number,
src: PropTypes.string.isRequired,
srcSetOptions: PropTypes.objectOf({
srcSetOptions: PropTypes.shape({
widths: PropTypes.arrayOf(PropTypes.number),
widthTolerance: PropTypes.number,
minWidth: PropTypes.number,
Expand Down Expand Up @@ -388,9 +388,10 @@ const Source = mergeComponentPropsHOF(

export default ReactImgixWrapped;
export {
ReactImgix as __ReactImgixImpl, // for testing
ReactImgix as __ReactImgixImpl,
Picture,
Source,
SourceImpl as __SourceImpl, // for testing
SourceImpl as __SourceImpl,
PictureImpl as __PictureImpl, // for testing
};

0 comments on commit ea362fe

Please sign in to comment.