From 1d5991819e61af03fedc29717eccbafa32c86b82 Mon Sep 17 00:00:00 2001 From: Abhijith Sheheer <89389135+abhijithsheheer@users.noreply.github.com> Date: Thu, 9 Jul 2026 09:45:00 +0530 Subject: [PATCH 1/2] Add articles button support to ChatInput Adds optional onArticles and showArticlesFor props. When onArticles is passed, a BookOpen icon button is rendered in the footer action row (next to canned responses), shown only for the option types listed in showArticlesFor (defaults to REPLY and NOTE). Needed by neeto-desk-rn to attach neetoKB help articles to ticket replies. --- src/components/ChatInput/ChatInput.jsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/components/ChatInput/ChatInput.jsx b/src/components/ChatInput/ChatInput.jsx index 92e088c1..4d687b39 100644 --- a/src/components/ChatInput/ChatInput.jsx +++ b/src/components/ChatInput/ChatInput.jsx @@ -11,6 +11,7 @@ import { Notes, Attachment, Forward, + BookOpen, CannedResponses, Down, SendPlane, @@ -149,6 +150,8 @@ export const ChatInput = forwardRef( onChangeText = () => {}, onForward, onCannedResponse, + onArticles, + showArticlesFor = [OPTION_TYPES.REPLY, OPTION_TYPES.NOTE], toEmails: initialToEmails, onReply = () => {}, onAddNote = () => {}, @@ -417,6 +420,16 @@ export const ChatInput = forwardRef( onPress={onCannedResponse} /> )} + {onArticles && showArticlesFor.includes(selectedOption) && ( + + )} Date: Thu, 9 Jul 2026 10:29:42 +0530 Subject: [PATCH 2/2] Updated JSDoc --- src/components/ChatInput/ChatInput.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/ChatInput/ChatInput.jsx b/src/components/ChatInput/ChatInput.jsx index 4d687b39..b5554b5b 100644 --- a/src/components/ChatInput/ChatInput.jsx +++ b/src/components/ChatInput/ChatInput.jsx @@ -99,6 +99,9 @@ const labels = { * * } * onChangeText={setValue} + * onArticles={() => { + * alert("On Articles"); + * }} * onCannedResponse={() => { * alert("On Canned Response"); * }}