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

PageLayout: Add padding prop to subcomponents #2201

Merged
merged 3 commits into from
Aug 2, 2022

Conversation

colebemis
Copy link
Contributor

Problem

There's no convenient way to set the inner padding of PageLayout regions. We only provide an API for specifying the "gap" between regions. Specifying "padding" instead of "gap" would be useful if you don't want gaps between region dividers:

CleanShot 2022-07-28 at 14 52 06@2x

Solution

This PR adds a padding prop to all subcomponents of PageLayout (i.e., Header, Content, Pane, Footer). You can use the new padding props to create a layout with connected dividers (which we need for SplitPageLayout):

CleanShot 2022-07-28 at 14 56 58@2x

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

Part of https://github.com/github/primer/issues/793

@colebemis colebemis requested review from a team and mperrotti July 28, 2022 22:01
@changeset-bot
Copy link

changeset-bot bot commented Jul 28, 2022

🦋 Changeset detected

Latest commit: 1add45a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 68.86 KB (+0.05% 🔺)
dist/browser.umd.js 69.26 KB (+0.06% 🔺)

@colebemis colebemis temporarily deployed to github-pages July 28, 2022 22:09 Inactive
@colebemis colebemis temporarily deployed to needs-approval August 2, 2022 00:09 Inactive
@colebemis colebemis temporarily deployed to github-pages August 2, 2022 00:15 Inactive
@colebemis colebemis merged commit 885064e into main Aug 2, 2022
@colebemis colebemis deleted the pagelayout-padding-prop branch August 2, 2022 00:52
@primer-css primer-css mentioned this pull request Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants