Currently, I am encountering an issue with Chakra UI in React where the functionality of a Box component is being executed instead of a Button when clicked inside it. Despite trying to adjust the z-index, the problem persists.
Here's my code snippet:
<Box
w="90%"
h="auto"
mt="10px"
position="relative"
key={index}
borderWidth="1px"
borderRadius="lg"
onClick={() =>
history.push(`/products/${item.cat_name}/${item.id}`)}
>
<h1 className={styles.heading_bold}>{item.cat_name}</h1>
<Button position="absolute" top="3" right="3" zIndex="0"> //Button not able to click
Options
</Button
</Box>