plugins – Add button gutenberg help


Hello I need to add a button to the toolbar gutenberg I found this https://developer.wordpress.org/block-editor/tutorials/format-api/2-toolbar-button/ but I do not get what is wrong for the button to appear

functions.php

enter image description here

my-custom-format.js

( function( wp ) {
    var MyCustomButton = function( props ) {
        return wp.element.createElement(
            wp.editor.RichTextToolbarButton, {
                icon: 'editor-code',
                title: 'Sample output',
                onClick: function() {
                    console.log( 'toggle format' );
                },
            }
        );
    }
    wp.richText.registerFormatType(
       'my-custom-format/sample-output', {
            title: 'Sample output',
            tagName: 'samp',
            className: null,
            edit: MyCustomButton,
        }
    );
} )( window.wp );