Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/react-core/src/components/LoginPage/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Fragment } from 'react';
import { css } from '@patternfly/react-styles';

import { BackgroundImage } from '../BackgroundImage';
import { Brand } from '../Brand';
import { Brand, BrandProps } from '../Brand';
import { List, ListVariant } from '../List';

import { Login } from './Login';
Expand All @@ -21,6 +21,8 @@ export interface LoginPageProps extends React.HTMLProps<HTMLDivElement> {
brandImgSrc?: string;
/** Attribute that specifies the alt text of the brand image for the login page */
brandImgAlt?: string;
/** Additional props for the brand image for the login page */
brandImgProps?: BrandProps;
/** Attribute that specifies the URL of the background image for the login page */
backgroundImgSrc?: string;
/** Content rendered inside of the text component of the login page */
Expand Down Expand Up @@ -50,6 +52,7 @@ export const LoginPage: React.FunctionComponent<LoginPageProps> = ({
className = '',
brandImgSrc = '',
brandImgAlt = '',
brandImgProps,
backgroundImgSrc = '',
footerListItems = null,
textContent = '',
Expand All @@ -65,7 +68,7 @@ export const LoginPage: React.FunctionComponent<LoginPageProps> = ({
}: LoginPageProps) => {
const HeaderBrand = (
<Fragment>
<Brand src={brandImgSrc} alt={brandImgAlt} />
{(brandImgSrc || brandImgProps?.src) && <Brand src={brandImgSrc} alt={brandImgAlt} {...brandImgProps} />}
</Fragment>
);
const Header = <LoginHeader headerBrand={HeaderBrand} />;
Expand Down
Loading