Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(AvatarGroup): remove removePadding prop and apply by default #2333

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion packages/core/docs/vibe-3-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ codemod: `avatar-component-migration`
- `isSquare` -> `square` [codemod ✅]
- `isDisabled` -> `disabled` [codemod ✅]

### AvatarGroup

- `noPadding` is removed as it's the default, component no longer gets a default padding bottom [codemod]

### BreadcrumbItem

- `isDisabled` -> `disabled` [codemod]
Expand Down Expand Up @@ -171,7 +175,7 @@ codemod: `avatar-component-migration`

### TabList

- `noPadding` is removed as it's the default, component no longer gets a default padding bottom
- `removePadding` is removed as it's the default, component no longer gets a default padding bottom [codemod]
talkor marked this conversation as resolved.
Show resolved Hide resolved

## TextField

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
flex-direction: row;
flex-wrap: wrap;
position: relative;
padding: var(--spacing-xs) var(--spacing-small) var(--spacing-xs) var(--spacing-medium);
margin: 0;
}

.noPadding {
padding: 0;
margin: 0;
}

.avatarContainer {
Expand Down
8 changes: 1 addition & 7 deletions packages/core/src/components/AvatarGroup/AvatarGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ export interface AvatarGroupProps extends VibeComponentProps {
* Using counter default tooltip virtualized list for rendering only visible items (performance optimization)
*/
counterTooltipIsVirtualizedList?: boolean;
/**
* If true, padding will be removed from the container
*/
// TODO remove this prop in the next major release, should be no padding by default
removePadding?: boolean;
/**
* If true, the component will be disabled and non interactive
*/
Expand All @@ -61,7 +56,6 @@ const AvatarGroup: React.FC<AvatarGroupProps> = ({
counterProps,
counterTooltipCustomProps,
counterTooltipIsVirtualizedList = false,
removePadding = false,
disabled
}) => {
const { displayAvatars, counterTooltipAvatars } = useMemo(() => {
Expand Down Expand Up @@ -90,7 +84,7 @@ const AvatarGroup: React.FC<AvatarGroupProps> = ({
}

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