Skip to content

Commit

Permalink
Added twmerge for ResponsiveImage
Browse files Browse the repository at this point in the history
Signed-off-by: wck-iipi <[email protected]>
  • Loading branch information
Wck-iipi committed Sep 9, 2024
1 parent e08d7f6 commit f537df6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/sponsors/ResponsiveImage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { twMerge } from 'tailwind-merge';

interface ResponsiveImageProps {
src: string;
Expand All @@ -16,7 +17,9 @@ interface ResponsiveImageProps {
* @param {string} props.dataTestId - A string for identifying the element during testing.
*/
const ResponsiveImage: React.FC<ResponsiveImageProps> = ({ src, alt, className, dataTestId }) => {
return <img src={src} alt={alt} className={`${className} w-full h-12 object-contain`} data-testid={dataTestId} />;
const classNameMerged = twMerge('w-full h-12 object-contain', className);

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

export default ResponsiveImage;

0 comments on commit f537df6

Please sign in to comment.