Skip to content

Admin UI: Use hasPadding prop in Page stories#76601

Open
CGastrell wants to merge 1 commit intoWordPress:trunkfrom
CGastrell:fix/page-stories-use-hasPadding
Open

Admin UI: Use hasPadding prop in Page stories#76601
CGastrell wants to merge 1 commit intoWordPress:trunkfrom
CGastrell:fix/page-stories-use-hasPadding

Conversation

@CGastrell
Copy link
Contributor

What?

Updates Page Storybook stories to use the hasPadding prop instead of inline padding styles on children.

Why?

As noted in #76467 (comment), consumers of Page should not have to pass custom padding every time — the component provides hasPadding for this purpose.

How?

Replace <Text style={ { padding: '24px 24px' } }> with hasPadding: true on all Page stories and simplify the children to <Text>Page content here</Text>.

Testing Instructions

  1. Run Storybook (npm run storybook:dev)
  2. Navigate to Admin UI > Page stories
  3. Verify all stories render with proper padding around the content area

Keyboard Testing

No keyboard-specific changes.


Follow-up to #76467.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: CGastrell <cgastrell@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ciampo ciampo self-requested a review March 17, 2026 19:55
@Mamaduka Mamaduka added [Type] Code Quality Issues or PRs that relate to code quality Storybook Storybook and its stories for components [Package] Admin UI /packages/admin-ui labels Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Admin UI /packages/admin-ui Storybook Storybook and its stories for components [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants