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

MenuItem: Add 40px size prop on Button #66596

Merged
merged 5 commits into from
Oct 31, 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 @@ -4,6 +4,7 @@

### Enhancements

- `MenuItem`: Add 40px size prop on Button ([#66596](https://github.com/WordPress/gutenberg/pull/66596)).
- `Guide`: Use small size button for page controls ([#66607](https://github.com/WordPress/gutenberg/pull/66607)).
- `PaletteEdit`: Add appropriate size props to Buttons ([#66590](https://github.com/WordPress/gutenberg/pull/66590)).
- `Notice`: Add appropriate size props to Buttons ([#66593](https://github.com/WordPress/gutenberg/pull/66593)).
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/menu-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function UnforwardedMenuItem(

return (
<Button
__next40pxDefaultSize
ref={ ref }
// Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked
aria-checked={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`MenuItem should match snapshot when all props provided 1`] = `
<button
aria-checked="true"
class="components-button components-menu-item__button my-class"
class="components-button components-menu-item__button my-class is-next-40px-default-size"
role="menuitemcheckbox"
type="button"
>
Expand Down Expand Up @@ -35,7 +35,7 @@ exports[`MenuItem should match snapshot when all props provided 1`] = `

exports[`MenuItem should match snapshot when info is provided 1`] = `
<button
class="components-button components-menu-item__button"
class="components-button components-menu-item__button is-next-40px-default-size"
role="menuitem"
type="button"
>
Expand All @@ -62,7 +62,7 @@ exports[`MenuItem should match snapshot when info is provided 1`] = `

exports[`MenuItem should match snapshot when isSelected and role are optionally provided 1`] = `
<button
class="components-button components-menu-item__button my-class"
class="components-button components-menu-item__button my-class is-next-40px-default-size"
role="menuitem"
type="button"
>
Expand Down Expand Up @@ -94,7 +94,7 @@ exports[`MenuItem should match snapshot when isSelected and role are optionally

exports[`MenuItem should match snapshot when only label provided 1`] = `
<button
class="components-button components-menu-item__button"
class="components-button components-menu-item__button is-next-40px-default-size"
role="menuitem"
type="button"
>
Expand Down
Loading