@@ -14,7 +14,7 @@ import {
1414// Import Chatbot components
1515import SendButton from './SendButton' ;
1616import MicrophoneButton from './MicrophoneButton' ;
17- import { AttachButton } from './AttachButton' ;
17+ import { AttachButton , AttachButtonProps } from './AttachButton' ;
1818import AttachMenu from '../AttachMenu' ;
1919import StopButton from './StopButton' ;
2020import { ChatbotDisplayMode } from '../Chatbot' ;
@@ -95,12 +95,7 @@ export interface MessageBarProps extends Omit<TextAreaProps, 'innerRef'> {
9595 isSendButtonDisabled ?: boolean ;
9696 /** Prop to allow passage of additional props to buttons */
9797 buttonProps ?: {
98- attach ?: {
99- tooltipContent ?: string ;
100- props ?: ButtonProps ;
101- inputTestId ?: string ;
102- tooltipProps ?: Omit < TooltipProps , 'content' > ;
103- } ;
98+ attach ?: AttachButtonProps & { props ?: ButtonProps } ;
10499 stop ?: { tooltipContent ?: string ; props ?: ButtonProps ; tooltipProps ?: Omit < TooltipProps , 'content' > } ;
105100 send ?: { tooltipContent ?: string ; props ?: ButtonProps ; tooltipProps ?: Omit < TooltipProps , 'content' > } ;
106101 microphone ?: {
@@ -376,7 +371,7 @@ export const MessageBarBase: FunctionComponent<MessageBarProps> = ({
376371 onAttachRejected = { onAttachRejected }
377372 validator = { validator }
378373 dropzoneProps = { dropzoneProps }
379- { ...buttonProps ?. attach ?. props }
374+ { ...buttonProps ?. attach }
380375 />
381376 ) }
382377 { ! attachMenuProps && hasAttachButton && (
@@ -396,6 +391,7 @@ export const MessageBarBase: FunctionComponent<MessageBarProps> = ({
396391 onAttachRejected = { onAttachRejected }
397392 validator = { validator }
398393 dropzoneProps = { dropzoneProps }
394+ { ...buttonProps ?. attach }
399395 { ...buttonProps ?. attach ?. props }
400396 />
401397 ) }
0 commit comments