From 90af81e7dce20b6e0626f14fec117126ea37a149 Mon Sep 17 00:00:00 2001 From: Grant Kinney Date: Mon, 29 Jul 2024 19:39:46 -0500 Subject: [PATCH] Converts save functions to render a static version of the block This allows the block to display content in non-browser contexts like email. --- packages/block-library/src/tab/edit.js | 5 +-- packages/block-library/src/tab/save.js | 17 ++------- packages/block-library/src/tab/style.scss | 6 --- packages/block-library/src/tabs/block.json | 4 +- packages/block-library/src/tabs/edit.js | 16 +++----- packages/block-library/src/tabs/save.js | 40 +++++--------------- packages/block-library/src/tabs/style.scss | 44 ++++++++++++---------- 7 files changed, 47 insertions(+), 85 deletions(-) diff --git a/packages/block-library/src/tab/edit.js b/packages/block-library/src/tab/edit.js index 720e7c48a12cc8..b9f923872a3f3b 100644 --- a/packages/block-library/src/tab/edit.js +++ b/packages/block-library/src/tab/edit.js @@ -42,9 +42,7 @@ export default function Edit( { attributes, clientId, setAttributes } ) { } }, [ label, setAttributes, tabIndex ] ); - const blockProps = useBlockProps( { - className: isActive ? 'is-active' : '', - } ); + const blockProps = useBlockProps(); const innerBlocksProps = useInnerBlocksProps( blockProps, { renderAppender: hasChildBlocks ? undefined @@ -54,6 +52,7 @@ export default function Edit( { attributes, clientId, setAttributes } ) {