Skip to content

Commit

Permalink
Align status component table to primer.style/status table (#2467)
Browse files Browse the repository at this point in the history
* Align react statuses table to primer.style/status
  • Loading branch information
josepmartins committed Oct 26, 2022
1 parent 9ff856d commit d396c89
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
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

0 comments on commit d396c89

Please sign in to comment.