diff --git a/packages/edit-site/src/components/style-book/examples.tsx b/packages/edit-site/src/components/style-book/examples.tsx index 0429ec1461b416..f26f283ffa4477 100644 --- a/packages/edit-site/src/components/style-book/examples.tsx +++ b/packages/edit-site/src/components/style-book/examples.tsx @@ -78,16 +78,18 @@ function getLandingBlockExamples( ( origin: ColorOrigin ) => origin.slug === 'theme' ); - const themeColorexample: BlockExample = { - name: 'theme-colors', - title: __( 'Theme Colors' ), - category: 'landing', - content: ( - - ), - }; - - examples.push( themeColorexample ); + if ( themePalette ) { + const themeColorexample: BlockExample = { + name: 'theme-colors', + title: __( 'Theme Colors' ), + category: 'landing', + content: ( + + ), + }; + + examples.push( themeColorexample ); + } // Use our own example for the Heading block so that we can show multiple // heading levels.