From 049645b01766f679ac245d1674371b7f5aa3028c Mon Sep 17 00:00:00 2001 From: Matthew Riley MacPherson Date: Thu, 3 May 2018 19:33:19 +0100 Subject: [PATCH] fix: Remove block alignment from paragraph block (fix #6476) (#6511) * fix: Remove block alignment from paragraph block (fix #6476) * chore: Deprecate width attribute from paragraph --- core-blocks/paragraph/index.js | 65 +++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 13 deletions(-) diff --git a/core-blocks/paragraph/index.js b/core-blocks/paragraph/index.js index c9b3d36ddddef0..d1e194f800e195 100644 --- a/core-blocks/paragraph/index.js +++ b/core-blocks/paragraph/index.js @@ -28,7 +28,6 @@ import { getColorClass, withColors, AlignmentToolbar, - BlockAlignmentToolbar, BlockControls, ContrastChecker, InspectorControls, @@ -145,7 +144,6 @@ class ParagraphBlock extends Component { content, dropCap, placeholder, - width, } = attributes; const fontSize = this.getFontSize(); @@ -227,12 +225,6 @@ class ParagraphBlock extends Component { } } isLargeText={ fontSize >= 18 } /> - - setAttributes( { width: nextWidth } ) } - /> -
+ ); + }, + }, { supports, attributes: omit( { @@ -437,7 +478,6 @@ export const settings = { save( { attributes } ) { const { - width, align, content, dropCap, @@ -454,7 +494,6 @@ export const settings = { const fontSizeClass = fontSize && FONT_SIZES[ fontSize ] && `is-${ fontSize }-text`; const className = classnames( { - [ `align${ width }` ]: width, 'has-background': backgroundColor || customBackgroundColor, 'has-drop-cap': dropCap, [ fontSizeClass ]: fontSizeClass,