primer / react

An implementation of GitHub's Primer Design System using React
https://primer.style/guides/react
MIT License
3.02k stars 520 forks source link

add classname prop support to PageHeader component and its children #4667

Closed ktravers closed 2 weeks ago

ktravers commented 3 weeks ago

Closes https://github.com/github/primer/issues/3331

This pull request introduces support for styling via CSS utility classes on the PageHeader component and its children by adding support for an optional className prop, allowing for more flexible customization without relying on Styled System props (sx). Full context: my team is currently in the process of deprecating our use of sx, so this change will allow us to safely incrementally replace sx props with className props.

Changelog

New

Changed

N/A

Removed

N/A

Rollout strategy

Testing & Reviewing

Prerequisites

  1. Open this branch locally or in a codespace
  2. Run npm run setup to setup dependencies

Click testing

  1. Run npm start to start the Storybook server
  2. Navigate to the PageHeader component in Storybook
  3. Review examples

Automated testing

  1. Run npx playwright install --with-deps to install dependencies
  2. Run npx playwright test --grep @vrt to run visual regression tests
  3. Run npx playwright test --grep @art to run accessibility tests
  4. Review test results

Merge checklist

changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: a44d6a04c80c364f5613e7f62866bf6d42e4f851

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[bot] commented 3 weeks ago

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 89.46 KB (0%)
packages/react/dist/browser.umd.js 89.73 KB (0%)
broccolinisoup commented 2 weeks ago

I am merging this so that I can include it in the current release! Thanks again 🙌🏻