I have created a MUI theme which works as expected. However, I am also using a custom component library created using create-react-library(https://www.npmjs.com/package/create-react-library) in my application. The library uses the material UI components too. The problem I am facing is that the theme I have created in my application is not getting applied to the components in the library.
This is behaving weird because if my page uses only components from my custom library then the theme is not applied to the library component, however, if the page uses a mix of custom library components and Material UI components(like Button, TextField) then the theme is applied.