From 92c2a229d9c9b510d71b928978872a8b107e9d5a Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 11 Apr 2023 09:47:25 +0700 Subject: Documentation and refactor code --- src/core/components/elements/Image/Image.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/components/elements/Image/Image.jsx') diff --git a/src/core/components/elements/Image/Image.jsx b/src/core/components/elements/Image/Image.jsx index ac82aaaf..ba6bf50d 100644 --- a/src/core/components/elements/Image/Image.jsx +++ b/src/core/components/elements/Image/Image.jsx @@ -1,6 +1,14 @@ import { LazyLoadImage } from 'react-lazy-load-image-component' import 'react-lazy-load-image-component/src/effects/opacity.css' +/** + * The `Image` component is used to display lazy-loaded images. + * + * @param {Object} props - Props passed to the `Image` component. + * @param {string} props.src - URL of the image to be displayed. + * @param {string} props.alt - Alternative text to be displayed if the image is not found. + * @returns {JSX.Element} - Rendered `Image` component. + */ const Image = ({ ...props }) => ( <>