From b30925407b6d421e4afbbd009b1c71db94e92853 Mon Sep 17 00:00:00 2001 From: Suresh M Date: Sun, 23 Jul 2023 23:40:19 -0700 Subject: [PATCH 1/4] Adding allowFilePicker and showInputText options --- README.md | 3 +++ demo/src/index.js | 4 +++- src/components/ChatWindow.js | 6 +++++- src/components/Launcher.js | 8 +++++++- src/components/UserInput.js | 10 ++++++---- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e3e2cd457..b303fea37 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ class Demo extends Component { onMessageWasSent={this._onMessageWasSent.bind(this)} messageList={this.state.messageList} showEmoji + showFilePicker /> ) } @@ -107,6 +108,8 @@ Launcher props: | onFilesSelected | function([fileList](https://developer.mozilla.org/en-US/docs/Web/API/FileList)) | no | Called after file has been selected from dialogue in chat window. | | onMessageWasSent | function([message](#message-objects)) | yes | Called when a message is sent, with a message object as an argument. | | showEmoji | boolean | no | Whether or not to show the emoji button in the input bar. Defaults to `true`. +| showFilePicker | boolean | no | Whether or not to show the file picker icon in the input bar. Defaults to `true`. +| allowInputText | boolean | no | Whether or not to allow user to input text in the input bar. Defaults to `true`. ### Message Objects diff --git a/demo/src/index.js b/demo/src/index.js index dedcf9090..d52404c71 100644 --- a/demo/src/index.js +++ b/demo/src/index.js @@ -78,7 +78,9 @@ class Demo extends Component { newMessagesCount={this.state.newMessagesCount} handleClick={this._handleClick.bind(this)} isOpen={this.state.isOpen} - showEmoji + showEmoji={this.state.showEmoji} + showFilePicker={this.state.showFilePicker} + allowInputText={this.state.allowInputText} />