Skip to content

Commit

Permalink
Remove fallback text
Browse files Browse the repository at this point in the history
  • Loading branch information
Sukhendu2002 committed Jan 14, 2025
1 parent fbe7e7b commit 3d612dd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/block-library/src/details/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@
* WordPress dependencies
*/
import { RichText, useBlockProps, InnerBlocks } from '@wordpress/block-editor';
import { __ } from '@wordpress/i18n';

export default function save( { attributes } ) {
const { showContent } = attributes;
const summary = attributes.summary?.toString().trim()
? attributes.summary
: __( 'Details' );
const blockProps = useBlockProps.save();

return (
<details { ...blockProps } open={ showContent }>
<summary>
<RichText.Content value={ summary } />
<RichText.Content value={ attributes.summary } />
</summary>
<InnerBlocks.Content />
</details>
Expand Down

0 comments on commit 3d612dd

Please sign in to comment.