Skip to content

Commit

Permalink
alt made compulsory to add in ResponsiveImage
Browse files Browse the repository at this point in the history
  • Loading branch information
Wck-iipi committed Oct 16, 2024
1 parent f537df6 commit fa4eae3
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions components/sponsors/ResponsiveImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { twMerge } from 'tailwind-merge';

interface ResponsiveImageProps {
src: string;
alt?: string;
alt: string;
className?: string;
dataTestId: string;
}
Expand All @@ -16,10 +16,22 @@ interface ResponsiveImageProps {
* @param {string} props.className - Additional CSS class names for styling the image.
* @param {string} props.dataTestId - A string for identifying the element during testing.
*/
const ResponsiveImage: React.FC<ResponsiveImageProps> = ({ src, alt, className, dataTestId }) => {
const ResponsiveImage: React.FC<ResponsiveImageProps> = ({
src,
alt,
className,
dataTestId,
}) => {
const classNameMerged = twMerge('w-full h-12 object-contain', className);

return <img src={src} alt={alt} className={`${classNameMerged}`} data-testid={dataTestId} />;
return (
<img
src={src}
alt={alt}
className={`${classNameMerged}`}
data-testid={dataTestId}
/>
);
};

export default ResponsiveImage;

0 comments on commit fa4eae3

Please sign in to comment.