diff --git a/packages/ra-ui-materialui/src/auth/Login.tsx b/packages/ra-ui-materialui/src/auth/Login.tsx index 29cca6a98d8..6e46a21abf9 100644 --- a/packages/ra-ui-materialui/src/auth/Login.tsx +++ b/packages/ra-ui-materialui/src/auth/Login.tsx @@ -27,8 +27,13 @@ import { LoginForm as DefaultLoginForm } from './LoginForm'; * ); */ export const Login = (props: LoginProps) => { - const { children = defaultLoginForm, backgroundImage, ...rest } = props; - const containerRef = useRef(null); + const { + children = defaultLoginForm, + backgroundImage, + avatarIcon = defaultAvatarIcon, + ...rest + } = props; + const containerRef = useRef(); let backgroundImageLoaded = false; const checkAuth = useCheckAuth(); const navigate = useNavigate(); @@ -68,9 +73,7 @@ export const Login = (props: LoginProps) => {
- - - + {avatarIcon}
{children}
@@ -80,7 +83,10 @@ export const Login = (props: LoginProps) => { const defaultLoginForm = ; +const defaultAvatarIcon = ; + export interface LoginProps extends HtmlHTMLAttributes { + avatarIcon?: ReactNode; backgroundImage?: string; children?: ReactNode; className?: string;