Hi,
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.
<PlasmicComponent
component={plasmicComponent}
forceOriginal
componentProps={{
root: {
as: "button",
props: {
onClick: () => triggerEvent(event),
children: "I need images"
}
}
}}
/>