Would it be a good idea if <Paper>
<Stepper component="div">
<Step>
<StepLabel>Hello world</StepLabel>
</Step>
</Stepper>
I want to render a Stepper that doesn't use Paper - essentially I want it to have very plain styling and not be affected by any global styling that I do to the Paper component.
I believe there isn't a straightforward way to do this already, and was thinking that if we could pass a component to Stepper (which would default to <Paper>) then that would be similar to other components that take a prop that selects the inner component rendered.
Giving an override of no border or background for Stepper in the theme definition.
overrides: {
MuiStepper: {
root: {
background: 'none',
border: 'none',
},
},
},
It does the trick well enough for now, but I can foresee issues coming later when I add a bit more complicated CSS to the Paper component (which I don't want Stepper receiving)
@eedrah Thanks for the report. I was keeping track of it at https://trello.com/c/ZDzhlNs9/1527-stepper-remove-paper but it's great to have an issue too.
If Paper is removed, does Stepper need a component prop? It can just be "wrapped in paper" (with ribbon and a bow 馃檪 ):
<Paper>
<Stepper>
<Step>
<StepLabel>Hello world</StepLabel>
</Step>
</Stepper>
<Paper>
In the unknown, we can start without a component prop, and wait for a solid use case from a developer?
Yep, it's the approach @eps1lon has advocated for.
Most helpful comment
Current workaround
Giving an override of no border or background for Stepper in the theme definition.
It does the trick well enough for now, but I can foresee issues coming later when I add a bit more complicated CSS to the Paper component (which I don't want Stepper receiving)