File size: 434 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;