Slide component throws error in Pigment project #43750
Labels
component: slider
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
Steps to reproduce
Link to live example: https://github.com/ptpittman/github-ejtbjs/tree/main
Steps:
Current behavior
I’m migrating a small project into MUI 6/Pigment as a test. I’ve moved all the theme setup over into next.config, DefaultPropsProvider etc, and all is functioning well enough to keep going with it. I have removed ThemeProvider as the docs seem to suggest, which by extension I’d imagine breaks useTheme(). I understand this as a necessity.
However, I use the MUI Slide component on a client nav component, in this sort of way:
This throws:
I’ve attempted to define easing, as follows, for example:
But this does not alleviate the error. Looking at the source of @mui/material/Slide/Slide.js, I see that the defaults have an expectation on useTheme returning transitions, as follows:
I’d imagine this might be the same for other related elements like Fade, but haven’t checked. Is there anyway around this other than restoring ThemeProvider and running a separate client side theme file outside of next.config?
Expected behavior
Slide element should render using default props in a Pigment context.
Context
Render Slide component without error on a client component, using Pigment CSS and MUI 6.
Your environment
npx @mui/envinfo
Search keywords: Slide, Pigment
The text was updated successfully, but these errors were encountered: