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

TabPanel: Add 40px size prop to tab Button #66557

Merged
merged 2 commits into from
Oct 29, 2024
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/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
### Internal

- ESLint: Stop disabling `react-hooks/exhaustive-deps` rule ([#66324](https://github.com/WordPress/gutenberg/pull/66324)).
- `TabPanel`: Add 40px size prop to tab Button ([#66557](https://github.com/WordPress/gutenberg/pull/66557)).

## 28.10.0 (2024-10-16)

Expand Down
1 change: 1 addition & 0 deletions packages/components/src/tab-panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ const UnforwardedTabPanel = (
) }-view` }
render={
<Button
__next40pxDefaultSize
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit of a bummer that this prop is a no-op here due to the style override.

icon={ tab.icon }
label={ tab.icon && tab.title }
showTooltip={ !! tab.icon }
Expand Down
4 changes: 1 addition & 3 deletions packages/components/src/tab-panel/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
}
}

// This tab style CSS is duplicated verbatim in
// /packages/edit-post/src/components/sidebar/settings-header/style.scss
Comment on lines -10 to -11
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This stylesheet was completely removed in #55360.

.components-tab-panel__tabs-item {
position: relative;
border-radius: 0;
height: $grid-unit-60;
height: $grid-unit-60 !important; // https://github.com/WordPress/gutenberg/pull/65075#discussion_r1746282734
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I'd love it if we can clean those up at some point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be pretty simple to sweep up after the 40px becomes the default.

background: transparent;
border: none;
box-shadow: none;
Expand Down
Loading