Skip to content

Commit

Permalink
Merge pull request #408 from fhlavac/children
Browse files Browse the repository at this point in the history
fix(ContentHeader): Allow children in ContentHeader
  • Loading branch information
radekkaluzik authored Oct 24, 2024
2 parents 0615f4a + 43463bf commit d8af989
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/module/src/ContentHeader/ContentHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface PageHeaderLinkProps extends ButtonProps {
isExternal?: boolean;
}

export interface ContentHeaderProps {
export interface ContentHeaderProps extends React.PropsWithChildren {
/** Title for content header */
title: string;
/** Subtitle for content header */
Expand All @@ -39,6 +39,8 @@ export interface ContentHeaderProps {
actionMenu?: React.ReactNode;
/** Custom OUIA ID */
ouiaId?: string | number;
/** Child nodes */
children?: React.ReactNode;
}

const useStyles = createUseStyles({
Expand All @@ -55,6 +57,7 @@ export const ContentHeader: React.FunctionComponent<React.PropsWithChildren<Cont
label,
breadcrumbs = null,
actionMenu,
children = null,
ouiaId = 'ContentHeader',
}: ContentHeaderProps) => {
const classes = useStyles();
Expand Down Expand Up @@ -110,6 +113,7 @@ export const ContentHeader: React.FunctionComponent<React.PropsWithChildren<Cont
</TextContent>
</FlexItem>
</Flex>
{children}
</PageSection>
)};

Expand Down

0 comments on commit d8af989

Please sign in to comment.