react-code-dataset / wp-calypso /client /devdocs /design /wordpress-components-gallery /focal-point-picker.tsx
react-code-dataset / wp-calypso /client /devdocs /design /wordpress-components-gallery /focal-point-picker.tsx
Download wp-calypso/client/devdocs/design/wordpress-components-gallery/focal-point-picker.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 434 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/devdocs/design/wordpress-components-gallery/focal-point-picker.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/devdocs/design/wordpress-components-gallery/focal-point-picker.tsx
-
curl -L -o focal-point-picker.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/devdocs/design/wordpress-components-gallery/focal-point-picker.tsx
434 Bytes
| import { FocalPointPicker } from '@wordpress/components'; | |
| import { useState } from 'react'; | |
| const FocalPointPickerExample = () => { | |
| const url = 'https://interactive-examples.mdn.mozilla.net/media/examples/flower.webm'; | |
| const [ focalPoint, setFocalPoint ] = useState( { | |
| x: 0.5, | |
| y: 0.5, | |
| } ); | |
| return <FocalPointPicker value={ focalPoint } onChange={ setFocalPoint } url={ url } />; | |
| }; | |
| export default FocalPointPickerExample; | |