Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Stepper] Remove Paper component #18423

Closed
1 task done
eedrah opened this issue Nov 18, 2019 · 5 comments · Fixed by #22564
Closed
1 task done

[Stepper] Remove Paper component #18423

eedrah opened this issue Nov 18, 2019 · 5 comments · Fixed by #22564
Labels
breaking change component: stepper This is the name of the generic UI component, not the React module! ready to take Help wanted. Guidance available. There is a high chance the change will be accepted
Milestone

Comments

@eedrah
Copy link
Contributor

eedrah commented Nov 18, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

Would it be a good idea if accepts a component prop? By default, this would be <Paper>

Examples 🌈

<Stepper component="div">
    <Step>
        <StepLabel>Hello world</StepLabel>
    </Step>
</Stepper>

Motivation 🔦

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.

@eedrah
Copy link
Contributor Author

eedrah commented Nov 18, 2019

Current workaround

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)

@oliviertassinari oliviertassinari added this to the v5 milestone Nov 18, 2019
@oliviertassinari oliviertassinari added the component: stepper This is the name of the generic UI component, not the React module! label Nov 18, 2019
@oliviertassinari

This comment has been minimized.

@oliviertassinari oliviertassinari changed the title Stepper should be able to be rendered without Paper [Stepper] Remove Paper component Dec 1, 2019
@oliviertassinari oliviertassinari added the ready to take Help wanted. Guidance available. There is a high chance the change will be accepted label Jul 12, 2020
@mbrookes
Copy link
Member

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>

@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 11, 2020

In the unknown, we can start without a component prop, and wait for a solid use case from a developer?

@mbrookes
Copy link
Member

Yep, it's the approach @eps1lon has advocated for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: stepper This is the name of the generic UI component, not the React module! ready to take Help wanted. Guidance available. There is a high chance the change will be accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants