Skip to content

Commit

Permalink
Update example code in README
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Aug 23, 2022
1 parent 757e615 commit c99d3e6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/components/src/focal-point-picker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ const Example = () => {
} );

const url = '/path/to/image';
const dimensions = {
width: 400,
height: 100,
};

/* Example function to render the CSS styles based on Focal Point Picker value */
const style = {
Expand All @@ -33,9 +29,10 @@ const Example = () => {
<>
<FocalPointPicker
url={ url }
dimensions={ dimensions }
value={ focalPoint }
onChange={ ( focalPoint ) => setFocalPoint( { focalPoint } ) }
onDragStart={ setFocalPoint }
onDrag={ setFocalPoint }
onChange={ setFocalPoint }
/>
<div style={ style } />
</>
Expand Down

0 comments on commit c99d3e6

Please sign in to comment.