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
1 change: 1 addition & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- `Tabs`: Replace hardcoded font values with design tokens on tab buttons ([#75537](https://github.com/WordPress/gutenberg/pull/75537)).
- `Field`: Fix default gap spacing ([#75446](https://github.com/WordPress/gutenberg/pull/75446)).
- `Button`: Fix disabled styles while `focusableWhenDisabled={false}` ([#75568](https://github.com/WordPress/gutenberg/pull/75568)).
- `IconButton`: make icon always `24px` regardless of `size` prop ([#75677](https://github.com/WordPress/gutenberg/pull/75677)).

### Enhancements

Expand Down
3 changes: 2 additions & 1 deletion packages/ui/src/icon-button/icon-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export const IconButton = forwardRef< HTMLButtonElement, IconButtonProps >(
>
<Icon
icon={ icon }
size={ size === 'small' ? 22 : 24 }
size={ 24 }
className={ styles.icon }
/>
</Tooltip.Trigger>
<Tooltip.Popup>
Expand Down
7 changes: 7 additions & 0 deletions packages/ui/src/icon-button/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@
--wp-ui-button-padding-inline: 0;
--wp-ui-button-min-width: unset;
}

.icon {
/* Compensate for the button's 1px border so the icon extends
edge-to-edge and doesn't inflate the button's dimensions
(e.g. 24px icon inside a 24px-tall small button). */
margin: -1px;
}
}
Loading