Download wp-calypso/apps/o2-blocks/src/task/save.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 332 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/o2-blocks/src/task/save.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/apps/o2-blocks/src/task/save.js
-
curl -L -o save.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/o2-blocks/src/task/save.js
332 Bytes
| import clsx from 'clsx'; | |
| const save = ( { attributes } ) => { | |
| const { checked, content, className } = attributes; | |
| const todoClass = clsx( 'wp-block-todo', className, { 'is-checked': checked } ); | |
| return ( | |
| <div className={ todoClass }> | |
| { checked ? '✅' : '⬜' } | |
| <p>{ content }</p> | |
| </div> | |
| ); | |
| }; | |
| export default save; | |