Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(chat): forward rest props and style escape hatches in ChatSendButton (#4190)

Cindy Zhang32535f5afab1
diff --git a/packages/core/src/Chat/ChatSendButton.tsx b/packages/core/src/Chat/ChatSendButton.tsx
index c80217f7e8..d51b656eaf 100644
--- a/packages/core/src/Chat/ChatSendButton.tsx
+++ b/packages/core/src/Chat/ChatSendButton.tsx
@@ -88,7 +88,10 @@ export function ChatSendButton(props: ChatSendButtonProps): ReactNode {
stopIcon,
size = 'md',
xstyle,
+ className,
+ style,
ref,
+ ...rest
} = props;
const handleSend = onSend ?? (() => context?.onSubmit(''));
@@ -111,7 +114,10 @@ export function ChatSendButton(props: ChatSendButtonProps): ReactNode {
isIconOnly
isDisabled={!isStopShown && isDisabled}
onClick={isStopShown ? onStop : handleSend}
+ {...rest}
{...themeProps('chat-send-button')}
+ className={className}
+ style={style}
xstyle={[styles.root, xstyle]}
/>
);