Gutenberg : how can I get the title of the current block within its ‘edit’ function?

Question

I’m a Gutenberg newbie.

I’m trying to display a placeholder component with my block’s edit function:

export default function Edit( { attributes, setAttributes, className } ) {
  return (
    <Placeholder
      icon={ icon }
      label={ title }
    >
  );
}

I would like to display the block icon and title, as they have been defined within the function registerBlockType.

Could someone point me how to do this ?
Thanks !

0
gordie 4 months 0 Answers 15 views 0

Leave an answer