File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ export interface PageHeaderLinkProps extends ButtonProps {
2525export interface ContentHeaderProps extends React . PropsWithChildren {
2626 /** Title for content header */
2727 title : string ;
28- /** Subtitle for content header */
29- subtitle : string ;
28+ /** Optional subtitle for content header */
29+ subtitle ? : string ;
3030 /** Optional link below subtitle */
3131 linkProps ?: PageHeaderLinkProps ;
3232 /** Optional icon for content header (appears to the left of the content header's title with a divider) */
@@ -102,9 +102,11 @@ export const ContentHeader: React.FunctionComponent<React.PropsWithChildren<Cont
102102 ) }
103103 </ Split >
104104 < TextContent >
105- < Text component = "p" ouiaId = { `${ ouiaId } -subtitle` } >
106- { subtitle }
107- </ Text >
105+ { subtitle && (
106+ < Text component = "p" ouiaId = { `${ ouiaId } -subtitle` } >
107+ { subtitle }
108+ </ Text >
109+ ) }
108110 { linkProps && (
109111 < Button variant = { ButtonVariant . link } component = "a" ouiaId = { `${ ouiaId } -link-button` } isInline icon = { linkProps . isExternal ? < ExternalLinkAltIcon className = 'pf-v5-u-ml-sm' /> : null } iconPosition = "end" { ...linkProps } >
110112 { linkProps . label }
You can’t perform that action at this time.
0 commit comments