Validate missing prop types

This commit is contained in:
Ariful Alam committed 2022-03-20 01:36:43 +06:00
1 parent a2ada305a7
commit ec458191fb
11 files changed
+63 -8

No files matched your search

+7
View File
@@ -1,4 +1,5 @@
import { useState, Fragment, useEffect } from 'react';
import PropTypes from 'prop-types';
const LazyImage = ({ placeholder, src, alt, ...rest }) => {
const [loading, setLoading] = useState(true);
@@ -19,4 +20,10 @@ const LazyImage = ({ placeholder, src, alt, ...rest }) => {
);
};
LazyImage.propTypes = {
placeholder: PropTypes.node,
alt: PropTypes.string,
src: PropTypes.string,
};
export default LazyImage;