diff --git a/docs/content/Box.md b/docs/content/Box.mdx similarity index 77% rename from docs/content/Box.md rename to docs/content/Box.mdx index fd06f09675d..29f413b4567 100644 --- a/docs/content/Box.md +++ b/docs/content/Box.mdx @@ -1,10 +1,12 @@ --- title: Box +status: Beta description: A low-level utility component that accepts styled system props to enable custom theme-aware styling source: https://github.com/primer/react/blob/main/src/Box.tsx --- import {Props} from '../src/props' +import {ComponentChecklist} from '../src/component-checklist' import {Box} from '@primer/components' ```jsx live @@ -72,3 +74,23 @@ Use Box to create [grid](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_ ``` + +## Component status + + diff --git a/docs/src/component-checklist.js b/docs/src/component-checklist.js new file mode 100644 index 00000000000..008b7b3a4c5 --- /dev/null +++ b/docs/src/component-checklist.js @@ -0,0 +1,81 @@ +import {Box, StyledOcticon, Link, Text} from '@primer/components' +import {H3} from '@primer/gatsby-theme-doctocat/src/components/heading' +import {CheckCircleFillIcon, CircleIcon, SkipIcon} from '@primer/octicons-react' +import React from 'react' + +/** Render component status checklist in documentation pages */ +export function ComponentChecklist({items}) { + return ( + <> +

Alpha

+ + Component props are documented. + + Component does not have any unnecessary third-party dependencies. + + Component can adapt to different themes. + + Component can adapt to different screen sizes. + + Component has 100% test coverage. + +

Beta

+ + Component is used in a production application. + Common usage examples are documented. + + Component has been reviewed by a systems designer and any resulting issues have been addressed. + + + Component has been manually reviewed by the accessibility team and any resulting issues have been addressed. + + +

Stable

+ + + Component API has been stable with no breaking changes for at least one month. + + + Feedback on API usability has been sought from developers using the component and any resulting issues have + been addressed. + + + Component has corresponding design guidelines documented in the{' '} + interface guidelines. + + + Component has corresponding Figma component in the Primer Web library. + + + + ) +} + +// TODO: This component should live in Doctocat +function Checklist({'aria-describedby': ariaDescribedby, children}) { + return ( + + {children} + + ) +} + +Checklist.Item = ({checked, children}) => { + return ( + + + {checked ? ( + + ) : checked === null ? ( + + ) : ( + + )} + + + {checked === null ? N/A: : null} + {children} + + + ) +}