diondiondion 964e8f7cf8 [Glitch] fix: Fix various UI text wrapping and overflow issues
Port 5dda094daa56dc13d50ac0734957ac5f6a9482de to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2025-05-25 15:26:37 +02:00

24 lines
613 B
TypeScript

import classNames from 'classnames';
/**
* Wrapper for displaying a number of Avatar components horizontally,
* either spaced out (default) or overlapping (using the `compact` prop).
*/
export const AvatarGroup: React.FC<{
compact?: boolean;
avatarHeight?: number;
children: React.ReactNode;
}> = ({ children, compact = false, avatarHeight }) => (
<div
className={classNames('avatar-group', { 'avatar-group--compact': compact })}
style={
avatarHeight
? ({ '--avatar-height': `${avatarHeight}px` } as React.CSSProperties)
: undefined
}
>
{children}
</div>
);