I wanted to ask that how can i add a new custom icon here in this menu.
Hi,@Matrin
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.
@Martin
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:
- Use the PopupMenu
- Render a custom micro-frontend, e.g. using Preact (Example in the PopupMenu)
- Use native JS and HTML, like
alert()
orconfirm()
@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.