Skip to content

Commit

Permalink
Fix placeholder block membrane; fix copy; add icon, label
Browse files Browse the repository at this point in the history
  • Loading branch information
mcsf committed Jul 10, 2023
1 parent 64fb7fb commit 3948272
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/block-library/src/footnotes/edit.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/**
* WordPress dependencies
*/
import { RichText, useBlockProps } from '@wordpress/block-editor';
import { BlockIcon, RichText, useBlockProps } from '@wordpress/block-editor';
import { useEntityProp } from '@wordpress/core-data';
import { __ } from '@wordpress/i18n';
import { Placeholder } from '@wordpress/components';
import { formatListNumbered as icon } from '@wordpress/icons';

export default function FootnotesEdit( { context: { postType, postId } } ) {
const [ meta, updateMeta ] = useEntityProp(
Expand All @@ -18,9 +19,15 @@ export default function FootnotesEdit( { context: { postType, postId } } ) {

if ( ! footnotes.length ) {
return (
<Placeholder { ...blockProps }>
{ __( 'No footnotes yet.' ) }
</Placeholder>
<div { ...blockProps }>
<Placeholder
icon={ <BlockIcon icon={ icon } /> }
label={ __( 'Footnotes' ) }
instructions={ __(
'Footnotes found in blocks within this document will be displayed here.'
) }
/>
</div>
);
}

Expand Down

0 comments on commit 3948272

Please sign in to comment.