Download wp-calypso/client/blocks/post-edit-button/docs/example.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 518 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/blocks/post-edit-button/docs/example.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/blocks/post-edit-button/docs/example.jsx
-
curl -L -o example.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/blocks/post-edit-button/docs/example.jsx
518 Bytes
| import { PureComponent } from 'react'; | |
| import PostEditButton from 'calypso/blocks/post-edit-button'; | |
| export default class PostEditButtonExample extends PureComponent { | |
| static displayName = 'PostEditButtonExample'; | |
| render() { | |
| const post = { ID: 123, type: 'post' }; | |
| const site = { slug: 'example.com' }; | |
| return ( | |
| <div className="design-assets__group"> | |
| <h2> | |
| <a href="/devdocs/design/edit-button">Post Edit Button</a> | |
| </h2> | |
| <PostEditButton post={ post } site={ site } /> | |
| </div> | |
| ); | |
| } | |
| } | |