diff --git a/extensions/blocks/wordads/constants.js b/extensions/blocks/wordads/constants.js index 1c56fd7d589f1..b0d21b8fae9c5 100644 --- a/extensions/blocks/wordads/constants.js +++ b/extensions/blocks/wordads/constants.js @@ -34,7 +34,7 @@ export const AD_FORMATS = [ name: __( 'Leaderboard 728x90' ), tag: 'leaderboard', width: 728, - editorPadding: 40, + editorPadding: 60, }, { height: 50, @@ -47,7 +47,7 @@ export const AD_FORMATS = [ name: __( 'Mobile Leaderboard 320x50' ), tag: 'mobile_leaderboard', width: 320, - editorPadding: 60, + editorPadding: 100, }, { height: 600, diff --git a/extensions/blocks/wordads/edit.js b/extensions/blocks/wordads/edit.js index 720588f25bb48..8bb8a74a088f1 100644 --- a/extensions/blocks/wordads/edit.js +++ b/extensions/blocks/wordads/edit.js @@ -4,7 +4,7 @@ import { __ } from '../../utils/i18n'; import { BlockControls } from '@wordpress/editor'; import { Component, Fragment } from '@wordpress/element'; -import { Placeholder } from '@wordpress/components'; +import { Placeholder, ToggleControl } from '@wordpress/components'; /** * Internal dependencies @@ -16,9 +16,13 @@ import { icon, title } from './'; import './editor.scss'; class WordAdsEdit extends Component { + handleHideMobileChange = hideMobile => { + this.props.setAttributes( { hideMobile: !! hideMobile } ); + }; + render() { const { attributes, setAttributes } = this.props; - const { format } = attributes; + const { format, hideMobile } = attributes; const selectedFormatObject = AD_FORMATS.filter( ( { tag } ) => tag === format )[ 0 ]; return ( @@ -37,9 +41,12 @@ class WordAdsEdit extends Component { height: selectedFormatObject.height + selectedFormatObject.editorPadding, } } > -