Skip to content

Commit

Permalink
fix: <AvatarGroup> rename freshly added padding prop to removePadding (
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyRoyt authored Oct 25, 2023
1 parent 3bcbc78 commit 76cdd25
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/AvatarGroup/AvatarGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ interface AvatarGroupProps extends VibeComponentProps {
*/
counterTooltipIsVirtualizedList?: boolean;
/**
* Whether or not to render the AvatarGroup with padding
* If true, padding will be removed from the container
*/
padding?: boolean;
// TODO remove this prop in the next major release, should be no padding by default
removePadding?: boolean;
}

const AvatarGroup: React.FC<AvatarGroupProps> = ({
Expand All @@ -55,7 +56,7 @@ const AvatarGroup: React.FC<AvatarGroupProps> = ({
counterProps,
counterTooltipCustomProps,
counterTooltipIsVirtualizedList = false,
padding = true
removePadding = false
}) => {
const { displayAvatars, counterTooltipAvatars } = useMemo(() => {
if (!children) {
Expand All @@ -82,7 +83,7 @@ const AvatarGroup: React.FC<AvatarGroupProps> = ({
}

return (
<div className={cx(styles.avatarGroupContainer, className, { [styles.noPadding]: !padding })} id={id}>
<div className={cx(styles.avatarGroupContainer, className, { [styles.noPadding]: removePadding })} id={id}>
{displayAvatars}
<AvatarGroupCounter
counterTooltipAvatars={counterTooltipAvatars}
Expand Down

0 comments on commit 76cdd25

Please sign in to comment.