mia-platform / design-system

React graphical components designed by Mia Platform
https://mia-platform.github.io/design-system/
Apache License 2.0
12 stars 1 forks source link

The injected theme css variables are not available in the modal #553

Closed MIA-Deltat1995 closed 1 month ago

MIA-Deltat1995 commented 2 months ago

The feature or bug you are proposing

The CSS variables inserted by the ThemeProvider are not available in the Modal content and in any HTML element that is external to the div element of the ThemeProvider

A snippet of code for replicating the issue or showing the proposal usage if applicable

Using the browser ispector on the modal content of the storybook, it is clear that the css variables are not inherited and instead there are on the button 'Open Modal' used to open the modal.

Danielecina commented 2 months ago

All feedback Antd components are spawned to the default tag <body />. It is possible to change this default globally. In case it isn't possible we can think of using portals or something to push all of these elements to the ThemeProvider node

Useful link: https://ant.design/components/config-provider