summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2020-01-06 14:32:30 -0500
committerAnthony G. Basile <blueness@gentoo.org>2020-01-06 14:32:30 -0500
commit10ef81bf85ad0a4bad0d204838e14c99ca2526f7 (patch)
treeb4bb36a326d41de12d1a6181d2a2baf34696ac24 /plugins/jetpack/extensions/blocks/map/locations/index.js
parentUpdating script for Update (diff)
downloadblogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.tar.gz
blogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.tar.bz2
blogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.zip
Update jetpack 8.0
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/extensions/blocks/map/locations/index.js')
-rw-r--r--plugins/jetpack/extensions/blocks/map/locations/index.js81
1 files changed, 0 insertions, 81 deletions
diff --git a/plugins/jetpack/extensions/blocks/map/locations/index.js b/plugins/jetpack/extensions/blocks/map/locations/index.js
deleted file mode 100644
index 80385891..00000000
--- a/plugins/jetpack/extensions/blocks/map/locations/index.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * External dependencies
- */
-import {
- Button,
- Dashicon,
- Panel,
- PanelBody,
- TextareaControl,
- TextControl,
-} from '@wordpress/components';
-import { Component } from '@wordpress/element';
-
-/**
- * Internal dependencies
- */
-import './style.scss';
-
-export class Locations extends Component {
- constructor() {
- super( ...arguments );
- this.state = {
- selectedCell: null,
- };
- }
-
- onDeletePoint = e => {
- const index = parseInt( e.target.getAttribute( 'data-id' ) );
- const { points, onChange } = this.props;
-
- const newPoints = points.slice( 0 );
- newPoints.splice( index, 1 );
- onChange( newPoints );
- };
-
- setMarkerField( field, value, index ) {
- const { points, onChange } = this.props;
-
- const newPoints = points.slice( 0 );
- newPoints[ index ][ field ] = value;
- onChange( newPoints );
- }
-
- render() {
- const { points } = this.props;
- const rows = points.map( ( point, index ) => (
- <PanelBody title={ point.placeTitle } key={ point.id } initialOpen={ false }>
- <TextControl
- label="Marker Title"
- value={ point.title }
- onChange={ title => this.setMarkerField( 'title', title, index ) }
- />
- <TextareaControl
- label="Marker Caption"
- value={ point.caption }
- rows="3"
- onChange={ caption => this.setMarkerField( 'caption', caption, index ) }
- />
- <Button
- data-id={ index }
- onClick={ this.onDeletePoint }
- className="component__locations__delete-btn"
- >
- <Dashicon icon="trash" size="15" /> Delete Marker
- </Button>
- </PanelBody>
- ) );
- return (
- <div className="component__locations">
- <Panel className="component__locations__panel">{ rows }</Panel>
- </div>
- );
- }
-}
-
-Locations.defaultProps = {
- points: Object.freeze( [] ),
- onChange: () => {},
-};
-
-export default Locations;