react-code-dataset / wp-calypso /apps /design-system-docs /docs /components /packages /wp-components /status-indicator.tsx
react-code-dataset / wp-calypso /apps /design-system-docs /docs /components /packages /wp-components /status-indicator.tsx
Download wp-calypso/apps/design-system-docs/docs/components/packages/wp-components/status-indicator.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 466 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/design-system-docs/docs/components/packages/wp-components/status-indicator.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/apps/design-system-docs/docs/components/packages/wp-components/status-indicator.tsx
-
curl -L -o status-indicator.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/design-system-docs/docs/components/packages/wp-components/status-indicator.tsx
466 Bytes
| import { Tooltip } from '@wordpress/components'; | |
| import { ComponentStatus, statuses } from './data'; | |
| import styles from './status-indicator.module.scss'; | |
| export const StatusIndicator = ( { status }: { status: ComponentStatus } ) => { | |
| const { label, icon } = statuses.find( ( s ) => s.value === status ) ?? {}; | |
| return ( | |
| <Tooltip text={ label }> | |
| <div className={ styles[ 'status-indicator' ] } aria-label={ label }> | |
| { icon } | |
| </div> | |
| </Tooltip> | |
| ); | |
| }; | |