Skip to content

Commit b124939

Browse files
committed
Add heading level handling
1 parent 34f6d86 commit b124939

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

packages/module/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
flex-direction: column;
1414
row-gap: var(--pf-t--global--spacer--sm);
1515
}
16+
.pf-chatbot__title {
17+
font-size: var(--pf-v6-c-title--m-h3--FontSize);
18+
font-weight: var(--pf-v6-c-title--m-h3--FontWeight);
19+
line-height: var(--pf-v6-c-title--m-h3--LineHeight);
20+
}
1621
.pf-chatbot__title-container {
1722
display: flex;
1823
flex-direction: row;

packages/module/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ export interface ChatbotConversationHistoryNavProps extends DrawerProps {
126126
title?: string;
127127
/** Icon displayed in title */
128128
icon?: React.ReactNode;
129+
/** Heading header level */
130+
headingHeaderLevel?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
129131
}
130132

131133
export const ChatbotConversationHistoryNav: FunctionComponent<ChatbotConversationHistoryNavProps> = ({
@@ -159,6 +161,7 @@ export const ChatbotConversationHistoryNav: FunctionComponent<ChatbotConversatio
159161
noResultsState,
160162
isCompact,
161163
title = 'Chat History',
164+
headingHeaderLevel = 'h2',
162165
icon = <OutlinedClockIcon />,
163166
...props
164167
}: ChatbotConversationHistoryNavProps) => {
@@ -272,7 +275,9 @@ export const ChatbotConversationHistoryNav: FunctionComponent<ChatbotConversatio
272275
<Icon size="lg" className="pf-chatbot__title-icon">
273276
{icon}
274277
</Icon>
275-
<Title headingLevel="h3">{title}</Title>
278+
<Title className="pf-chatbot__title" headingLevel={headingHeaderLevel}>
279+
{title}
280+
</Title>
276281
</div>
277282
{!isLoading && handleTextInputChange && (
278283
<div className="pf-chatbot__input">

0 commit comments

Comments
 (0)