Skip to content

Commit

Permalink
[RNMobile] Remove unnecessary negative margin around empty gallery bl…
Browse files Browse the repository at this point in the history
…ock (#47086)

This PR removes some unwanted negative margin space from empty gallery blocks on native.
  • Loading branch information
Siobhan Bamber authored and Gerardo committed Jan 13, 2023
1 parent 90b5680 commit 8a08c90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,17 @@ function GalleryEdit( props ) {
className: classnames( className, 'has-nested-images' ),
} );

const nativeInnerBlockProps = Platform.isNative && {
marginHorizontal: 0,
marginVertical: 0,
};

const innerBlocksProps = useInnerBlocksProps( blockProps, {
allowedBlocks,
orientation: 'horizontal',
renderAppender: false,
__experimentalLayout: LAYOUT,
...nativeInnerBlockProps,
} );

if ( ! hasImages ) {
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ For each user feature we should also add a importance categorization label to i
-->

## Unreleased
- [**] Gallery block: Address styling regression, in which negative margin was added [#47086]

## 1.87.0
- [*] Add capabilities to force only Core blocks and control Support section [#46215]
Expand Down

0 comments on commit 8a08c90

Please sign in to comment.