Add onclick handlers for Button component instances

I made a component and named it ‘Button’. I am using this component at multiple places on a page. Now I want to add onclick handler separately on every instance of Button. All Handlers perform different task.
1.How can I do it?
2. I am substituting component and the default text on the Button component overwrites the text of Button instance on the page. I want it to be same as the text of button on the page.

              root: {
                as: "button",
                props: {
                  onClick: () => triggerEvent(event),
                  children: "I need images"


Hi @eligible_roadrunner, it looks like you need to forward the props that are being passed into the substitute component. You also need to make sure that you are not overriding all of those props when passing in your own props. You can use deeply nested spreads to help with this