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

Align status component table to primer.style/status table #2467

Merged
merged 7 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/orange-chairs-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Align status components table to primer.style/status table
2 changes: 1 addition & 1 deletion docs/content/deprecated/Buttons.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Button (legacy)
status: deprecated
status: Deprecated
source: https://github.com/primer/react/blob/main/src/Button
storybook: '/react/storybook?path=/story/composite-components-button--default-button'
---
Expand Down
6 changes: 5 additions & 1 deletion docs/content/status.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
---
title: Component status
description: Check the current status of Primer React components
description: Check the current status of Primer React components.
---

import {ComponentStatuses} from '../src/component-statuses'

<Note>

See the [component lifecycle](https://primer.style/contribute/component-lifecycle) for more information about each status.

</Note>

<ComponentStatuses />
31 changes: 27 additions & 4 deletions docs/src/component-statuses.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import componentMetadata from '@primer/component-metadata'
import {Link, Label, Text} from '@primer/react'
import {Link, Label, StyledOcticon} from '@primer/react'
import {AccessibilityInsetIcon} from '@primer/octicons-react'
import StatusLabel from '@primer/gatsby-theme-doctocat/src/components/status-label'
import Table from '@primer/gatsby-theme-doctocat/src/components/table'
import {graphql, Link as GatsbyLink, useStaticQuery} from 'gatsby'
Expand Down Expand Up @@ -63,13 +64,35 @@ export function ComponentStatuses() {
</Link>
</td>
<td align="center" valign="top" style={{whiteSpace: 'nowrap'}}>
<StatusLabel status={status} />
<StatusLabel size="large" status={status} />
</td>
<td align="center" valign="top" style={{whiteSpace: 'nowrap'}}>
{a11yReviewed ? (
<Label variant="primary">Reviewed</Label>
<Label
size="large"
sx={{
display: 'inline-flex',
alignItems: 'center',
gap: 1,
backgroundColor: 'done.subtle',
fontWeight: 'normal',
borderColor: 'transparent'
}}
>
<StyledOcticon icon={AccessibilityInsetIcon} sx={{fill: 'done.fg'}} />
Reviewed
</Label>
) : (
<Text sx={{color: 'fg.subtle'}}>Review pending</Text>
<Label
size="large"
sx={{
backgroundColor: 'neutral.subtle',
fontWeight: 'normal',
borderColor: 'transparent'
}}
>
Not reviewed
</Label>
)}
</td>
<td>{description}</td>
Expand Down