I want to have a clickable element within a step from Material UI's stepper. The element should be visible all the time and not only when a step is active. Setting all steps to active is not possible due to UX reasons.
Here's what I tried:
<Step key={x.id}>
<StepButton completed={false} onClick={() => xxx()}>
{title}
</StepButton>
<div style={{ display: "flex", justifyContent: "center" }}>
<IconButton onClick={(e) => show()}>
<InfoIcon />
</IconButton>
</div>
</Step>
But it seems like having a div inside a step is not allowed. Im getting errors in the div's row (e.g. Warning: Received true
for a non-boolean attribute active.)
Then I tried to put the Icon in the StepButton tag:
<Step key={x.id}>
<StepButton completed={false} onClick={() => xxx()}>
{title}
<IconButton onClick={(e) => show()}>
<InfoIcon />
</IconButton>
</StepButton>
</Step>
But this is not possible either, because Buttons inside Buttons are not allowed.
Is there any other way to use a clickable element (like the IconButton) in a step?