Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React, { useContext } from 'react';
import { clsx } from 'clsx';

import { AvatarPrimitiveContext } from '../contexts/AvatarPrimitiveContext';

export interface AvatarPrimitiveFallbackProps {
Expand All @@ -13,7 +15,7 @@ const AvatarPrimitiveFallback = ({ children, className = '' }: AvatarPrimitiveFa
return null;
}

return <span className={`${fallBackRootClass} ${className}`}>{children}</span>;
return <span className={clsx(fallBackRootClass, className)}>{children}</span>;
};

export default AvatarPrimitiveFallback;
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useContext } from 'react';
import { clsx } from 'clsx';

import { AvatarPrimitiveContext } from '../contexts/AvatarPrimitiveContext';

Expand Down Expand Up @@ -28,7 +29,7 @@ const AvatarPrimitiveImage = ({
alt={alt}
onError={handleErrorImage}
onLoad={handleLoadImage}
className={className}
className={clsx(className)}
{...props}
/>
);
Expand Down
3 changes: 2 additions & 1 deletion src/core/primitives/Avatar/fragments/AvatarPrimitiveRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState, useEffect } from 'react';
import { clsx } from 'clsx';

import { AvatarPrimitiveContext } from '../contexts/AvatarPrimitiveContext';
import { customClassSwitcher } from '~/core/customClassSwitcher';
Expand Down Expand Up @@ -38,7 +39,7 @@ const AvatarPrimitiveRoot = ({ children, className = '', customRootClass = '', s
};

return <AvatarPrimitiveContext.Provider value={values} >
<span className={`${rootClass} ${className}`} {...props}>{children}</span>
<span className={clsx(rootClass, className)} {...props}>{children}</span>
</AvatarPrimitiveContext.Provider>;
};

Expand Down
Loading