How do I add a new icon in this menu

Screenshot from 2024-05-30 11-40-24

I wanted to ask that how can i add a new custom icon here in this menu.

1 Like

Can you convert this into function component so that I can use hooks in it ?

If Yes please rewrite the solution.

Thanks You

EDIT: removed because of wrong information.

This is not a react component. While you can make it a funciton, I would not recommend it

@Martin ,
I am kind of new to bpmn. Can You help in conversion, as i want to use useStore() here

This is not a React component, but a default JavaScript Class with methods. As per our convention, you need getContextPadEntries when registering a new Context pad provider.

You can achieve the same with a function and __prototype__. As this is a bpmn-js extension, it does not use react and you can not use React hooks in it.

So let’s say if I want to open a Dialog box on the click of this icon the what should i do ?

This depends on you usecase. You have multiple options:

@Martin , Thank you so much for your time.

@Martin , I have created my own Dialog box and want to open it on the click of this button
Can you guide here ?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.