Skip to content

Commit

Permalink
MenuItem: Add 40px size prop on Button (WordPress#66596)
Browse files Browse the repository at this point in the history
* MenuItem: Add 40px size prop on Button

* Add changelog

* Update snapshots

Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
3 people authored and karthick-murugan committed Nov 13, 2024
1 parent 15b1802 commit f905e98
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
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

0 comments on commit f905e98

Please sign in to comment.