-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6f36a5
commit 4a243f3
Showing
19 changed files
with
1,986 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { compose } from '@wordpress/compose'; | ||
import { withNotices } from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import EditWithInnerBlocks from './edit'; | ||
import EditWithoutInnerBlocks from './v1/edit'; | ||
import { isGalleryV2Enabled } from './shared'; | ||
|
||
/* | ||
* Using a wrapper around the logic to load the edit for v1 of Gallery block | ||
* or the refactored version with InnerBlocks. This is to prevent conditional | ||
* use of hooks lint errors if adding this logic to the top of the edit component. | ||
*/ | ||
function GalleryEditWrapper( props ) { | ||
if ( ! isGalleryV2Enabled() ) { | ||
return <EditWithoutInnerBlocks { ...props } />; | ||
} | ||
|
||
return <EditWithInnerBlocks { ...props } />; | ||
} | ||
|
||
export default compose( [ withNotices ] )( GalleryEditWrapper ); |
2 changes: 2 additions & 0 deletions
2
packages/block-library/src/gallery/gallery-styles.native.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import "./v1/gallery-styles.native.scss"; | ||
|
||
.galleryAppender { | ||
padding-top: $grid-unit-20; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.