Prevents undefined classNames in Skeletons

This commit is contained in:
zomars committed 2022-06-27 21:04:10 -06:00
1 parent e3e1de3c11
commit 0794224288
1 file changed
+7 -2
+7 -2
View File
@@ -20,7 +20,12 @@ interface SkeletonContainer {
const SkeletonAvatar: React.FC<AvatarProps> = ({ width, height, className }) => {
return (
<div className={`mt-1 rounded-full bg-gray-200 ltr:mr-2 rtl:ml-2 w-${width} h-${height} ${className}`} />
<div
className={classNames(
`mt-1 rounded-full bg-gray-200 ltr:mr-2 rtl:ml-2 w-${width} h-${height}`,
className
)}
/>
);
};
@@ -38,7 +43,7 @@ const SkeletonText: React.FC<SkeletonBaseProps> = ({ width, height, className })
const SkeletonButton: React.FC<SkeletonBaseProps> = ({ width, height, className }) => {
return (
<SkeletonContainer>
<div className={`w-${width} h-${height} bg-gray-200 ${className}`} />
<div className={classNames(`w-${width} h-${height} bg-gray-200`, className)} />
</SkeletonContainer>
);
};