Skip to content

Commit

Permalink
fix spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
dratwas committed Nov 9, 2020
1 parent 795fd47 commit 2ec63f1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
38 changes: 20 additions & 18 deletions packages/block-editor/src/components/block-list/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,24 +274,26 @@ export class BlockList extends Component {
marginHorizontal = styles.defaultBlock.marginLeft,
} = this.props;
return (
<BlockListItem
isStackedHorizontally={ isStackedHorizontally }
rootClientId={ rootClientId }
clientId={ clientId }
parentWidth={ parentWidth }
contentResizeMode={ contentResizeMode }
contentStyle={ contentStyle }
onAddBlock={ onAddBlock }
marginVertical={ marginVertical }
marginHorizontal={ marginHorizontal }
onDeleteBlock={ onDeleteBlock }
shouldShowInnerBlockAppender={
this.shouldShowInnerBlockAppender
}
onCaretVerticalPositionChange={
this.onCaretVerticalPositionChange
}
/>
<View style={ { flex: 1 } }>
<BlockListItem
isStackedHorizontally={ isStackedHorizontally }
rootClientId={ rootClientId }
clientId={ clientId }
parentWidth={ parentWidth }
contentResizeMode={ contentResizeMode }
contentStyle={ contentStyle }
onAddBlock={ onAddBlock }
marginVertical={ marginVertical }
marginHorizontal={ marginHorizontal }
onDeleteBlock={ onDeleteBlock }
shouldShowInnerBlockAppender={
this.shouldShowInnerBlockAppender
}
onCaretVerticalPositionChange={
this.onCaretVerticalPositionChange
}
/>
</View>
);
}

Expand Down
12 changes: 6 additions & 6 deletions packages/block-library/src/gallery/gallery.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { mediaUploadSync } from '@wordpress/react-native-bridge';
import { useSelect } from '@wordpress/data';
import { WIDE_ALIGNMENTS } from '@wordpress/components';

const TILE_SPACING = 15;
const TILE_SPACING = 8;

// we must limit displayed columns since readable content max-width is 580px
const MAX_DISPLAYED_COLUMNS = 4;
Expand Down Expand Up @@ -61,17 +61,17 @@ export const Gallery = ( props ) => {
orientation: 'horizontal',
renderAppender: false,
numColumns: displayedColumns,
marginHorizontal: TILE_SPACING,
marginVertical: TILE_SPACING,
}
);

const isFullWidth = align === WIDE_ALIGNMENTS.alignments.full;

return (
<View style={ { flex: 1 } }>
<View style={ [ isFullWidth && styles.fullWidth ] }>
<View { ...innerBlocksProps } />
{ mediaPlaceholder }
</View>
<View style={ [ isFullWidth && styles.fullWidth ] }>
<View { ...innerBlocksProps } />
{ mediaPlaceholder }
</View>
);
};
Expand Down

0 comments on commit 2ec63f1

Please sign in to comment.