Skip to content

Commit

Permalink
Append new tab control
Browse files Browse the repository at this point in the history
  • Loading branch information
richtabor committed Jan 29, 2024
1 parent fae2703 commit def7637
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,23 +542,6 @@ function GalleryEdit( props ) {
__next40pxDefaultSize
/>
) }
<SelectControl
__nextHasNoMarginBottom
label={ __( 'Link to' ) }
value={ linkTo }
onChange={ setLinkTo }
options={ linkOptions }
hideCancelButton={ true }
size="__unstable-large"
/>
{ hasLinkTo && (
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Open in new tab' ) }
checked={ linkTarget === '_blank' }
onChange={ toggleOpenInNewTab }
/>
) }
{ imageSizeOptions?.length > 0 && (
<SelectControl
__nextHasNoMarginBottom
Expand All @@ -573,6 +556,15 @@ function GalleryEdit( props ) {
size="__unstable-large"
/>
) }
<SelectControl
__nextHasNoMarginBottom
label={ __( 'Link to' ) }
value={ linkTo }
onChange={ setLinkTo }
options={ linkOptions }
hideCancelButton={ true }
size="__unstable-large"
/>
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Crop images' ) }
Expand All @@ -585,6 +577,14 @@ function GalleryEdit( props ) {
checked={ !! randomOrder }
onChange={ toggleRandomOrder }
/>
{ hasLinkTo && (
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Open images in new tab' ) }
checked={ linkTarget === '_blank' }
onChange={ toggleOpenInNewTab }
/>
) }
{ Platform.isWeb && ! imageSizeOptions && hasImageIds && (
<BaseControl className={ 'gallery-image-sizes' }>
<BaseControl.VisualLabel>
Expand Down

0 comments on commit def7637

Please sign in to comment.