Skip to content

Commit

Permalink
Remove requirement for maxWidth and maxHeight props
Browse files Browse the repository at this point in the history
  • Loading branch information
marlo-longley committed Jan 8, 2025
1 parent 7134603 commit 1b4c943
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/IIIFThumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Image = styled('img', { name: 'IIIFThumbnail', slot: 'image' })(() => ({
*/
const LazyLoadedImage = ({
border = false, placeholder, style = {}, thumbnail = null,
resource, maxHeight, maxWidth, thumbnailsConfig = {}, ...props
resource, maxHeight = null, maxWidth = null, thumbnailsConfig = {}, ...props
}) => {
const { ref, inView } = useInView();
const [loaded, setLoaded] = useState(false);
Expand Down Expand Up @@ -117,8 +117,8 @@ const LazyLoadedImage = ({

LazyLoadedImage.propTypes = {
border: PropTypes.bool,
maxHeight: PropTypes.number.isRequired,
maxWidth: PropTypes.number.isRequired,
maxHeight: PropTypes.number,
maxWidth: PropTypes.number,
placeholder: PropTypes.string.isRequired,
resource: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
style: PropTypes.object, // eslint-disable-line react/forbid-prop-types
Expand Down

0 comments on commit 1b4c943

Please sign in to comment.