Closed be-next-hotdog closed 7 years ago
You can pass onClick
handler via props to each button so that implement your custom behaviour
<ChildButton
iconButton={MdAdd}
iconColor="black"
order={1}
backgroundColor="white"
onClick={() => {/* Your custom code goes here */}}
/>
Yep, I've tried this way but it will triggers immediately ChildButton onClick event while we click the MainButton and ChildButton is not a subnode of MainButton ... Have you showcase online ?
Thx a lot.
I've tried many times, I really had no idea why this triggered automatically the childbutton onclick event while clicking mainbutton.
I found out, the ChildButton covers always MainButton as you defined opacity: 0 while the menu is not active. It'd better assign z-index
to each component I think.
Yopp, I did not find the props while allow me to add a redirection link for child button ? Thx