Uh oh!
There was an error while loading. Please reload this page.
PageHeader: Add docs to primer.style and features to Storybook - #2694
Conversation
🦋 Changeset detectedLatest commit: 55cfa00 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
size-limit report 📦
|
| import {PageHeader} from '@primer/react' | ||
| ``` | ||
| ## Examples |
There was a problem hiding this comment.
I'd restructure the sections to follow what we have for the other components (for example, ActionList):
## Examples### With a title### With a title and actions
<!--allotherexamples-->##Props###PageHeaderOptionaldescriptionofthecomponent<PropsTable><!--propstablecontent--></PropsTable>###PageHeader.ContextAreaOptionaldescriptionofthecomponent<PropsTable><!--propstablecontent--></PropsTable><!--allotherchildelements-->| ## Examples | ||
| ### Anotomy of PageHeader |
There was a problem hiding this comment.
Instead of trying to explain the usage details of PageHeader components in the API docs, this should be covered in PageHeader interface guidelines in https://primer.style/design/. Sadly, we don't have these written yet.
When we provide a thorough set of examples, engineers can see how the parts of a PageHeader are meant to be used in live demos.
There was a problem hiding this comment.
Here's what I'd recommend as a thorough set of examples:
## Examples### Just has a title### Title variant="large"### Title with leading and trailing visuals### With actions### With description slot### With navigation slot### With a ContextArea with all possible children (only visible on mobile)### With a ContextArea with all possible children (always visible)There was a problem hiding this comment.
Thank you so much @mperrotti! This is great. You are right, the initial structure I was thinking is more of an interface guideline content not so much API docs. I updated the docs accordingly and added storybook features as well. Looking forward to hearing your thoughts 🙌🏼
f3b89a5 to
f0089e3Compare54b91bf to
da19d41CompareUh oh!
There was an error while loading. Please reload this page.
* PageHeader: Docs structure * Add descriptions to children * Add features to storybook * update NavList snapshots * remove component export from the main bundle * update snapshots
* PageHeader: Docs structure * Add descriptions to children * Add features to storybook * update NavList snapshots * remove component export from the main bundle * update snapshots
Closes#1570
This PR adds mdx documentation for PageHeader and export the component in the draft bundle
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.