From a7272351958ce9a22bcbc58773f8f240a9618200 Mon Sep 17 00:00:00 2001 From: timothycarambat Date: Fri, 2 Feb 2024 18:05:09 -0800 Subject: [PATCH] Add more styling options Add sponsor text at bottom Support dynamic container height Loading animations --- embed/README.md | 9 +++++ embed/src/App.jsx | 4 +-- .../ChatContainer/ChatHistory/index.jsx | 24 +++++++++----- .../ChatContainer/PromptInput/index.jsx | 9 ++--- .../ChatWindow/ChatContainer/index.jsx | 4 +-- .../components/ChatWindow/Header/index.jsx | 33 ++++++++++++++++--- embed/src/components/ChatWindow/index.jsx | 29 ++++++++++++++-- embed/src/components/Sponsor/index.jsx | 16 +++++++++ embed/src/hooks/useScriptAttributes.js | 4 +++ 9 files changed, 107 insertions(+), 25 deletions(-) create mode 100644 embed/src/components/Sponsor/index.jsx diff --git a/embed/README.md b/embed/README.md index b0f34231..a8edb9a2 100644 --- a/embed/README.md +++ b/embed/README.md @@ -66,9 +66,18 @@ REQUIRED data attributes: - `data-greeting` — Default text message to be shown when chat is opened and no previous message history is found. +- `data-no-sponsor` — Setting this attribute to anything will hide the custom or default sponsor at the bottom of an open chat window. + +- `data-sponsor-link` — A clickable link in the sponsor section in the footer of an open chat window. + +- `data-sponsor-text` — The text displays in sponsor text in the footer of an open chat window. + + **Behavior Overrides** - `data-open-on-load` — Once loaded, open the chat as default. It can still be closed by the user. +- `data-support-email` — Shows a support email that the user can used to draft an email via the "three dot" menu in the top right. Option will not appear if it is not set. + ### `