0

enter image description here

I want to change this icon to something custom. I have established how to create a custom block controls bar, but not sure how to change the icon.

import {BlockControls} from "@wordpress/block-editor";

2

There is a controls prop you can use which is an object. It goes inside. Controls has an icon key which takes a string which corresponds to a Dashicon slug.

<BLockControls
    controls={[
    icon=”wordpress”
    title=__("Test", "gutenberg-examples"),
    onClick: () => { doSomething },
    isActive: false

    
    ]}
/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.