diff --git a/packages/block-library/src/gallery/edit.js b/packages/block-library/src/gallery/edit.js index dd26843e1d515..96917012bcb55 100644 --- a/packages/block-library/src/gallery/edit.js +++ b/packages/block-library/src/gallery/edit.js @@ -42,6 +42,7 @@ import { sharedIcon } from './shared-icon'; import { defaultColumnsNumber, pickRelevantMediaFiles } from './shared'; import Gallery from './gallery'; +const ColumnsControl = Platform.OS === 'web' ? RangeControl : StepperControl; const MAX_COLUMNS = 8; const linkOptions = [ { value: 'attachment', label: __( 'Attachment Page' ) }, @@ -300,33 +301,6 @@ class GalleryEdit extends Component { } } - renderColumnsSettings( columns ) { - const { attributes } = this.props; - const { images } = attributes; - const label = __( 'Columns' ); - const minValue = 1; - const maxValue = Math.min( MAX_COLUMNS, images.length ); - - return images.length > 1 && ( - Platform.OS === 'web' ? - : - - ); - } - render() { const { attributes, @@ -382,7 +356,15 @@ class GalleryEdit extends Component { <> - { this.renderColumnsSettings( columns ) } + { images.length > 1 && }