diff --git a/packages/block-library/src/image/edit.native.js b/packages/block-library/src/image/edit.native.js index 73b9b9391fd17..83d561d8aad9a 100644 --- a/packages/block-library/src/image/edit.native.js +++ b/packages/block-library/src/image/edit.native.js @@ -26,6 +26,7 @@ import { BottomSheet, BottomSheetTextControl, BottomSheetSelectControl, + FooterMessageControl, FooterMessageLink, Badge, } from '@wordpress/components'; @@ -460,6 +461,8 @@ export class ImageEdit extends Component { setFeaturedButtonStyle, styles.removeFeaturedButton, ] } + cellContainerStyle={ styles.setFeaturedButtonCellContainer } + separatorType={ 'none' } onPress={ () => this.onSetFeatured( MEDIA_ID_NO_FEATURED_IMAGE_SET ) } @@ -470,17 +473,13 @@ export class ImageEdit extends Component { this.onSetFeatured( attributes.id ) } /> ); - return ( - - { isFeaturedImage - ? removeFeaturedButton() - : setFeaturedButton() } - - ); + return isFeaturedImage ? removeFeaturedButton() : setFeaturedButton(); } render() { @@ -564,8 +563,21 @@ export class ImageEdit extends Component { { this.getLinkSettings( true ) } - { canImageBeFeatured && - this.getFeaturedButtonPanel( isFeaturedImage ) } + + { canImageBeFeatured && + this.getFeaturedButtonPanel( isFeaturedImage ) } + + ); diff --git a/packages/block-library/src/image/styles.native.scss b/packages/block-library/src/image/styles.native.scss index 66f4a02cb6621..4c2ad06c4da7f 100644 --- a/packages/block-library/src/image/styles.native.scss +++ b/packages/block-library/src/image/styles.native.scss @@ -31,16 +31,21 @@ padding-bottom: $grid-unit; } +.featuredImagePanelTitle { + padding-bottom: 0; +} + +.setFeaturedButtonCellContainer { + align-items: flex-start; +} + .setFeaturedButton { - border-top-width: $border-width; - border-top-color: $light-gray-400; - padding: $grid-unit-20; - text-align: center; + text-align: left; color: $blue-50; + padding: $grid-unit-15 0; } .setFeaturedButtonDark { - border-top-color: $gray-70; color: $blue-30; } diff --git a/packages/components/src/panel/body.native.js b/packages/components/src/panel/body.native.js index 60d75ef7b16de..a2c055112fe43 100644 --- a/packages/components/src/panel/body.native.js +++ b/packages/components/src/panel/body.native.js @@ -9,11 +9,13 @@ import { Text, View } from 'react-native'; import styles from './body.scss'; import BottomSeparatorCover from './bottom-separator-cover'; -export function PanelBody( { children, title, style = {} } ) { +export function PanelBody( { children, title, style, titleStyle = {} } ) { return ( { title && ( - { title } + + { title } + ) } { children } diff --git a/packages/edit-post/src/editor.native.js b/packages/edit-post/src/editor.native.js index cc79e0fb006c3..ea9dbf9eeaab0 100644 --- a/packages/edit-post/src/editor.native.js +++ b/packages/edit-post/src/editor.native.js @@ -93,9 +93,15 @@ class Editor extends Component { this.subscriptionParentFeaturedImageIdNativeUpdated = subscribeFeaturedImageIdNativeUpdated( ( payload ) => { - editEntityRecord( 'postType', postType, postId, { - featured_media: payload.featuredImageId, - } ); + editEntityRecord( + 'postType', + postType, + postId, + { featured_media: payload.featuredImageId }, + { + undoIgnore: true, + } + ); } ); }