-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Modal: Decrease close button size #65131
Conversation
/** | ||
* The `headerActions` prop can be used to add auxiliary actions to the header, for example a fullscreen mode toggle. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the Storybook example so it shows an actual example of how this prop is used in Gutenberg.
.components-button { | ||
position: relative; | ||
left: $grid-unit-10; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the horizontal offset that was removed.
<Spacer | ||
marginBottom={ 0 } | ||
marginLeft={ 3 } | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Baked in some gap into the component because I'm pretty sure everyone will want it.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +8 B (0%) Total Size: 1.78 MB
ℹ️ View Unchanged
|
Looks good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Closes #65102
What?
Decreases the size of the close button in the Modal component, and remove the optical adjustment to make it flush with the content width.
Why?
The current close button uses the old 36px size which will be deprecated. We need to switch it to one of the new sizes, which was discussed in #65102.
Testing Instructions
Testing Instructions for Keyboard
Use keyboard to navigate the modals.
Screenshots or screencast
CleanShot.2024-09-07.at.06.45.38.mp4
✍️ Dev Note
Modal: Buttons in
headerActions
should use"small"
sizeThe close button in the Modal component is now using the
"small"
Button size (currently 24px), down from the 36px default size in the old sizing scheme.If you are using the
headerActions
prop to inject buttons beside the close button, we recommend you also use the"small"
Button size variant to match.