Skip to content

Commit

Permalink
fix(ChatbotConversationHistoryNav): Add additional menu item props
Browse files Browse the repository at this point in the history
Allow additional menu item props to be passed down from the history nav.
  • Loading branch information
rebeccaalpert committed Dec 10, 2024
1 parent f2ba7be commit 9ea0adf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import {
MenuList,
MenuGroup,
MenuItem,
MenuContent
MenuContent,
MenuItemProps
} from '@patternfly/react-core';

import { OutlinedCommentAltIcon } from '@patternfly/react-icons';
Expand All @@ -44,6 +45,8 @@ export interface Conversation {
label?: string;
/** Callback for when user selects item. */
onSelect?: (event?: React.MouseEvent, value?: string | number) => void;
/** Additional props passed to conversation menu item */
additionalProps?: MenuItemProps;
}
export interface ChatbotConversationHistoryNavProps extends DrawerProps {
/** Function called to toggle drawer */
Expand Down Expand Up @@ -121,6 +124,7 @@ export const ChatbotConversationHistoryNav: React.FunctionComponent<ChatbotConve
)
}
: {})}
{...conversation.additionalProps}
/* eslint-enable indent */
>
{conversation.text}
Expand Down

0 comments on commit 9ea0adf

Please sign in to comment.