Skip to content

Commit 463534c

Browse files
authored
fix(PageHeader): remove extra padding class when no subtitle is defined (#714)
1 parent ba20f93 commit 463534c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/module/src/PageHeader/PageHeader.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export interface PageHeaderProps extends React.PropsWithChildren {
4242
ouiaId?: string | number;
4343
/** Child nodes */
4444
children?: React.ReactNode;
45-
/** Optional classname that replaces the existing classname on the h1 element */
45+
/** Classname for the h1 element */
4646
headingClassname?: string;
4747
}
4848

@@ -62,7 +62,7 @@ export const PageHeader: React.FunctionComponent<PageHeaderProps> = ({
6262
actionMenu,
6363
ouiaId = 'PageHeader',
6464
children = null,
65-
headingClassname,
65+
headingClassname = subtitle ? 'pf-v6-u-mb-sm' : ''
6666
}: PageHeaderProps) => {
6767
const classes = useStyles();
6868
const { isExternal = false, ...linkRestProps } = linkProps ?? {};
@@ -95,7 +95,7 @@ export const PageHeader: React.FunctionComponent<PageHeaderProps> = ({
9595
<Split hasGutter>
9696
{title && (
9797
<SplitItem>
98-
<Content className={headingClassname ?? 'pf-v6-u-mb-sm'} component="h1" ouiaId={`${ouiaId}-title`}>
98+
<Content className={headingClassname} component="h1" ouiaId={`${ouiaId}-title`}>
9999
{title}
100100
</Content>
101101
</SplitItem>

0 commit comments

Comments
 (0)