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 {
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) */
@@ -97,9 +97,11 @@ export const ContentHeader: React.FunctionComponent<React.PropsWithChildren<Cont
9797 </ SplitItem >
9898 ) }
9999 </ Split >
100- < Content component = "p" ouiaId = { `${ ouiaId } -subtitle` } >
101- { subtitle }
102- </ Content >
100+ { subtitle && (
101+ < Content component = "p" ouiaId = { `${ ouiaId } -subtitle` } >
102+ { subtitle }
103+ </ Content >
104+ ) }
103105 { linkProps && (
104106 < Button variant = { ButtonVariant . link } component = "a" ouiaId = { `${ ouiaId } -link-button` } isInline icon = { isExternal ? < ExternalLinkAltIcon className = 'pf-v6-u-ml-sm' /> : null } iconPosition = "end" { ...linkRestProps } >
105107 { linkProps . label }
You can’t perform that action at this time.
0 commit comments