-
-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Description
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.
How to reproduce
import {HydraAdmin} from "@api-platform/admin"
import {houseDarkTheme, houseLightTheme} from "react-admin"
import {Admin} from "@react-admin/ra-enterprise"
import {SolarLayout} from "@react-admin/ra-navigation";
const GyroscopsLoader = ({ entrypoint, ...rest }: DashboardLoaderProps) => {
return (
<HydraAdmin
admin={Admin}
dataProvider={dataProvider}
entrypoint={entrypoint}
layout={SolarLayout}
lightTheme={houseLightTheme}
darkTheme={houseDarkTheme}
defaultTheme="light"
{{...rest}}
>
// Resources here
</HydraAdmin>
)
}
Possible Solution
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.
Additional Context
#403
Metadata
Metadata
Assignees
Labels
No labels