I am reading the following documentation :
- React-Admin customize login background: https://marmelab.com/react-admin/Theming.html#using-a-custom-login-page
- Material-UI customize theme: https://material-ui.com/customization/components/
I do not want to use a background, I want to edit the css styles property in ra-ui-materialui/src/auth/Login.tsx which use:
const useStyles = makeStyles(
(theme: Theme) => ({
main: {
backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)',
},
}),
{ name: 'RaLogin' }
);
According to mui documentation (https://material-ui.com/customization/components/#global-theme-override), it should be overridable like this:
import { createMuiTheme } from '@material-ui/core/styles';
import pink from '@material-ui/core/colors/pink';
/**
* @public
* @name theme
* @description
* Application material ui main theme, read more at https://material-ui.com
* It is used to configure the spacings, colors, fonts and components of the application
* @type {object}
*/
const theme = createMuiTheme({
overrides: {
RaLogin: {
main: {
backgroundImage: 'radial-gradient(circle at 50% 14em, #ff0000 0%, #ff0000 60%, #ff0000 100%)',
},
}
},
});
React-Admin documentation show how to use an image by passing the props backgroundImage to <Login />, but that's not what I need.
How can I edit the logging background in Material-UI/React-Admin ?