diff --git a/packages/edit-site/src/components/style-book/index.js b/packages/edit-site/src/components/style-book/index.js index 723953777e2b28..f05acdfdd30080 100644 --- a/packages/edit-site/src/components/style-book/index.js +++ b/packages/edit-site/src/components/style-book/index.js @@ -24,7 +24,6 @@ import { } from '@wordpress/block-editor'; import { privateApis as editorPrivateApis } from '@wordpress/editor'; import { useSelect, dispatch } from '@wordpress/data'; -import { useResizeObserver } from '@wordpress/compose'; import { useMemo, useState, @@ -227,7 +226,6 @@ function StyleBook( { userConfig = {}, path = '', } ) { - const [ resizeObserver, sizes ] = useResizeObserver(); const [ textColor ] = useGlobalStyle( 'color.text' ); const [ backgroundColor ] = useGlobalStyle( 'color.background' ); const colors = useMultiOriginPalettes(); @@ -282,7 +280,6 @@ function StyleBook( { >
600, 'is-button': !! onClick, } ) } style={ { @@ -290,7 +287,6 @@ function StyleBook( { background: backgroundColor, } } > - { resizeObserver } { showTabs ? (
@@ -331,7 +327,6 @@ function StyleBook( { isSelected={ isSelected } onSelect={ onSelect } settings={ settings } - sizes={ sizes } title={ tab.title } goTo={ goTo } /> @@ -346,7 +341,6 @@ function StyleBook( { onClick={ onClick } onSelect={ onSelect } settings={ settings } - sizes={ sizes } goTo={ goTo } /> ) } @@ -420,7 +414,6 @@ export const StyleBookPreview = ( { userConfig = {}, isStatic = false } ) => { onChangeSection( `/blocks/${ encodeURIComponent( blockName ) }` ); }; - const [ resizeObserver, sizes ] = useResizeObserver(); const colors = useMultiOriginPalettes(); const examples = getExamples( colors ); const examplesForSinglePageUse = getExamplesForSinglePageUse( examples ); @@ -489,14 +482,12 @@ export const StyleBookPreview = ( { userConfig = {}, isStatic = false } ) => { return (
- { resizeObserver } @@ -511,7 +502,6 @@ export const StyleBookBody = ( { onClick, onSelect, settings, - sizes, title, goTo, } ) => { @@ -574,9 +564,7 @@ export const StyleBookBody = ( { 'body { cursor: pointer; } body * { pointer-events: none; }' } 600, - } ) } + className="edit-site-style-book__examples" filteredExamples={ examples } label={ title