You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dark Themes does not work with React Admin Enterprise #596
API Platform version(s) affected: @api-platform/admin 3.4.9
Description
It is not possible to configure the light and dark themes when using React Admin Enterprise, the Dark Theme parameters are lost in the process and we only get a broken standard dark theme on most parts of the application.
In the AdminGuesser.tsx file, the AdminGuesser component does override anything we could set inside the darkTheme prop with the default APIP dark theme. It may be fixed by fixing this forced override.
changed the title [-]Light/Dark Themes does not work with React Admin EE[/-][+]Light/Dark Themes does not work with React Admin Enterprise[/+]on Feb 13, 2025
changed the title [-]Light/Dark Themes does not work with React Admin Enterprise[/-][+]Dark Themes does not work with React Admin Enterprise[/+]on Feb 13, 2025
Activity
[-]Light/Dark Themes does not work with React Admin EE[/-][+]Light/Dark Themes does not work with React Admin Enterprise[/+][-]Light/Dark Themes does not work with React Admin Enterprise[/-][+]Dark Themes does not work with React Admin Enterprise[/+]slax57 commentedon Mar 3, 2025
I believe you're right!
In v3,
<AdminGuesser>does not propagate thedarkThemeprop and instead overrides it with the default dark theme.https://github.com/api-platform/admin/blob/v3.4.9/src/AdminGuesser.tsx
However in v4, this issue was fixed and now the
darkThemeprop is properly forwarded.https://github.com/api-platform/admin/blob/v4.0.4/src/core/AdminGuesser.tsx
So, you can solve this issue by upgrading to
@api-platform/adminv4.