diff --git a/packages/block-library/src/button/edit.native.js b/packages/block-library/src/button/edit.native.js index 2a11a1948f9973..7c46ac27366afa 100644 --- a/packages/block-library/src/button/edit.native.js +++ b/packages/block-library/src/button/edit.native.js @@ -398,6 +398,7 @@ class ButtonEdit extends Component { const backgroundColor = this.getBackgroundColor(); const textColor = this.getTextColor(); + const isFixedWidth = !! width; return ( @@ -426,6 +427,12 @@ class ButtonEdit extends Component { onChange={ this.onChangeText } style={ { ...richTextStyle.richText, + paddingLeft: isFixedWidth + ? 0 + : richTextStyle.richText.paddingLeft, + paddingRight: isFixedWidth + ? 0 + : richTextStyle.richText.paddingRight, color: textColor, } } textAlign={ align } @@ -435,7 +442,7 @@ class ButtonEdit extends Component { identifier="text" tagName="p" minWidth={ minWidth } // The minimum Button size. - maxWidth={ maxWidth } // The width of the screen. + maxWidth={ isFixedWidth ? minWidth : maxWidth } // The width of the screen. id={ clientId } isSelected={ isButtonFocused } withoutInteractiveFormatting diff --git a/packages/block-library/src/button/rich-text.ios.scss b/packages/block-library/src/button/rich-text.ios.scss index 27ec62345fa266..6ac8c973d67f53 100644 --- a/packages/block-library/src/button/rich-text.ios.scss +++ b/packages/block-library/src/button/rich-text.ios.scss @@ -1,4 +1,6 @@ .richText { margin: 10px $grid-unit-20; + padding-left: 0; + padding-right: 0; background-color: transparent; }