|
Download wp-calypso/packages/components/src/ribbon/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 609 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/components/src/ribbon/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/components/src/ribbon/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/components/src/ribbon/README.md
609 Bytes
| # Ribbon (JSX) | |
| Ribbon is a component you can slap on a Card or a similar container to distinguish it in | |
| some way. Ribbons came to us in the early 2010s when they were put on every container on the web. | |
| Since then, the internet’s love for ribbons have subsided, but they will always find a | |
| place in our hearts. | |
| --- | |
| ## How to use | |
| ```js | |
| import { Card, Ribbon } from '@automattic/components'; | |
| function MyCard() { | |
| return ( | |
| <Card> | |
| <Ribbon color="green">Default</Ribbon> | |
| <p>Some text</p> | |
| </Card> | |
| ); | |
| } | |
| ``` | |
| --- | |
| ## Props | |
| - `color`: (string) The color of the ribbon. Currently only supports green. | |