Download wp-calypso/packages/components/src/ribbon/index.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 429 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/components/src/ribbon/index.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/components/src/ribbon/index.tsx
-
curl -L -o index.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/components/src/ribbon/index.tsx
429 Bytes
| import clsx from 'clsx'; | |
| import type { ReactNode, FunctionComponent } from 'react'; | |
| import './style.scss'; | |
| type Props = { | |
| color?: 'green' | undefined; | |
| children: ReactNode; | |
| }; | |
| const Ribbon: FunctionComponent< Props > = ( props ) => ( | |
| <div | |
| className={ clsx( { | |
| ribbon: true, | |
| 'is-green': props.color === 'green', | |
| } ) } | |
| > | |
| <span className="ribbon__title">{ props.children }</span> | |
| </div> | |
| ); | |
| export default Ribbon; | |