diff --git a/packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md b/packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md
index bd890a0a..33620492 100644
--- a/packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md
+++ b/packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md
@@ -34,6 +34,7 @@ import ChatbotFooter, { ChatbotFootnote } from '@patternfly/chatbot/dist/dynamic
import MessageBar from '@patternfly/chatbot/dist/dynamic/MessageBar';
import MessageBox from '@patternfly/chatbot/dist/dynamic/MessageBox';
import Message from '@patternfly/chatbot/dist/dynamic/Message';
+import Compare from '@patternfly/chatbot/dist/dynamic/Compare';
import ChatbotConversationHistoryNav from '@patternfly/chatbot/dist/dynamic/ChatbotConversationHistoryNav';
import ChatbotHeader, {
@@ -107,6 +108,19 @@ This demo displays an embedded ChatBot. Embedded ChatBots are meant to be placed
### Comparing ChatBots
To let users compare how different ChatBots respond to the same prompt, you can add multiple ChatBots within the same window. The following demo illustrates a comparison view pattern that allows users to toggle between different conversations in a single ChatBot window.
+
+Your code structure should look like this:
+
+```noLive
+
+
+
+
+
+
+
+
+```
```js file="./EmbeddedComparisonChatbot.tsx" isFullscreen
diff --git a/packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx b/packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx
index 622274b2..b90bb265 100644
--- a/packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx
+++ b/packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx
@@ -9,9 +9,7 @@ import {
PageSidebarBody,
PageSidebar,
MastheadToggle,
- PageToggleButton,
- ToggleGroup,
- ToggleGroupItem
+ PageToggleButton
} from '@patternfly/react-core';
import Chatbot, { ChatbotDisplayMode } from '@patternfly/chatbot/dist/dynamic/Chatbot';
import ChatbotContent from '@patternfly/chatbot/dist/dynamic/ChatbotContent';
@@ -21,6 +19,7 @@ import MessageBar from '@patternfly/chatbot/dist/dynamic/MessageBar';
import MessageBox from '@patternfly/chatbot/dist/dynamic/MessageBox';
import Message, { MessageProps } from '@patternfly/chatbot/dist/dynamic/Message';
import ChatbotHeader, { ChatbotHeaderMain } from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
+import Compare from '@patternfly/chatbot/dist/dynamic/Compare';
import { BarsIcon } from '@patternfly/react-icons';
import userAvatar from '../Messages/user_avatar.svg';
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
@@ -113,7 +112,7 @@ export const CompareChild = ({ name, input, hasNewInput, setIsSendButtonDisabled
return (
-
+ {name}
@@ -132,40 +131,9 @@ export const CompareChild = ({ name, input, hasNewInput, setIsSendButtonDisabled
export const EmbeddedComparisonChatbotDemo: React.FunctionComponent = () => {
const [input, setInput] = React.useState();
const [hasNewInput, setHasNewInput] = React.useState(false);
- const [isSelected, setIsSelected] = React.useState('toggle-group-chatbot-1');
- const [showFirstChatbot, setShowFirstChatbot] = React.useState(true);
- const [showSecondChatbot, setShowSecondChatbot] = React.useState(false);
const [isSidebarOpen, setIsSidebarOpen] = React.useState(false);
const [isSendButtonDisabled, setIsSendButtonDisabled] = React.useState(false);
- React.useEffect(() => {
- // we want to show the first if we switch to the mobile toggle view
- // and reset/switch back to normal otherwise
- const updateChatbotVisibility = () => {
- if (window.innerWidth >= 901) {
- setShowFirstChatbot(true);
- setShowSecondChatbot(true);
- } else {
- setShowFirstChatbot(true);
- setShowSecondChatbot(false);
- setIsSelected('toggle-group-chatbot-1');
- }
- };
- window.addEventListener('resize', updateChatbotVisibility);
-
- return () => {
- window.removeEventListener('resize', updateChatbotVisibility);
- };
- }, []);
-
- // this only happens on mobile
- const handleChildToggleClick = (event) => {
- const id = event.currentTarget.id;
- setIsSelected(id);
- setShowSecondChatbot(!showSecondChatbot);
- setShowFirstChatbot(!showFirstChatbot);
- };
-
const handleSend = (value: string) => {
setInput(value);
setHasNewInput(!hasNewInput);
@@ -204,46 +172,26 @@ export const EmbeddedComparisonChatbotDemo: React.FunctionComponent = () => {
return (