From 5d1ca50dd07536970b06bef325cf8eeeb2f34c06 Mon Sep 17 00:00:00 2001 From: Rebecca Alpert Date: Thu, 19 Sep 2024 15:14:39 -0400 Subject: [PATCH] chore(ChatbotHeader): Update logos Kayla wants a smaller logo on smaller chatbot sizes - updating CSS and demos to reflect this. --- .../examples/Chatbot/Chatbot.md | 2 ++ .../examples/Chatbot/Chatbot.tsx | 25 +++++++++++++------ .../ChatbotHeader/PF-IconLogo-Color.svg | 17 +++++++++++++ .../ChatbotHeader/PF-IconLogo-Reverse.svg | 16 ++++++++++++ .../examples/demos/AttachmentDemos.md | 2 ++ .../examples/demos/ChatbotAttachment.tsx | 25 +++++++++++++------ .../src/ChatbotHeader/ChatbotHeader.scss | 5 ++++ 7 files changed, 76 insertions(+), 16 deletions(-) create mode 100644 packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ChatbotHeader/PF-IconLogo-Color.svg create mode 100644 packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ChatbotHeader/PF-IconLogo-Reverse.svg diff --git a/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/Chatbot/Chatbot.md b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/Chatbot/Chatbot.md index 975893d..0f1a493 100644 --- a/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/Chatbot/Chatbot.md +++ b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/Chatbot/Chatbot.md @@ -47,6 +47,8 @@ import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-dra import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon'; import PFHorizontalLogoColor from '../ChatbotHeader/PF-HorizontalLogo-Color.svg'; import PFHorizontalLogoReverse from '../ChatbotHeader/PF-HorizontalLogo-Reverse.svg'; +import PFIconLogoColor from '../ChatbotHeader/PF-IconLogo-Color.svg'; +import PFIconLogoReverse from '../ChatbotHeader/PF-IconLogo-Reverse.svg'; ### Basic example diff --git a/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/Chatbot/Chatbot.tsx b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/Chatbot/Chatbot.tsx index f14fbf4..d75ac6a 100644 --- a/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/Chatbot/Chatbot.tsx +++ b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/Chatbot/Chatbot.tsx @@ -24,6 +24,8 @@ import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/ou import PFHorizontalLogoColor from '../ChatbotHeader/PF-HorizontalLogo-Color.svg'; import PFHorizontalLogoReverse from '../ChatbotHeader/PF-HorizontalLogo-Reverse.svg'; +import PFIconLogoColor from '../ChatbotHeader/PF-IconLogo-Color.svg'; +import PFIconLogoReverse from '../ChatbotHeader/PF-IconLogo-Reverse.svg'; const footnoteProps = { label: 'Lightspeed uses AI. Check for mistakes.', @@ -130,6 +132,20 @@ export const BasicDemo: React.FunctionComponent = () => { const handleSend = (message) => alert(message); + const horizontalLogo = ( + + + + + ); + + const iconLogo = ( + <> + + + + ); + return ( <> { alert('Menu toggle clicked')} /> - -
- -
-
- -
-
+ {displayMode === ChatbotDisplayMode.fullscreen ? horizontalLogo : iconLogo}
diff --git a/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ChatbotHeader/PF-IconLogo-Color.svg b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ChatbotHeader/PF-IconLogo-Color.svg new file mode 100644 index 0000000..bc9527a --- /dev/null +++ b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ChatbotHeader/PF-IconLogo-Color.svg @@ -0,0 +1,17 @@ + + + PF-IconLogo-color + + + + + + + + + + \ No newline at end of file diff --git a/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ChatbotHeader/PF-IconLogo-Reverse.svg b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ChatbotHeader/PF-IconLogo-Reverse.svg new file mode 100644 index 0000000..f8e97c5 --- /dev/null +++ b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ChatbotHeader/PF-IconLogo-Reverse.svg @@ -0,0 +1,16 @@ + + + PF-IconLogo-Reverse + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/demos/AttachmentDemos.md b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/demos/AttachmentDemos.md index 041e85c..c271b85 100644 --- a/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/demos/AttachmentDemos.md +++ b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/demos/AttachmentDemos.md @@ -38,6 +38,8 @@ ChatbotHeaderOptionsDropdown import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon'; import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-drawer-right-icon'; import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon'; +import PFIconLogoColor from '../ChatbotHeader/PF-IconLogo-Color.svg'; +import PFIconLogoReverse from '../ChatbotHeader/PF-IconLogo-Reverse.svg'; # Demos diff --git a/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/demos/ChatbotAttachment.tsx b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/demos/ChatbotAttachment.tsx index f77ab3a..413ea8a 100644 --- a/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/demos/ChatbotAttachment.tsx +++ b/packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/demos/ChatbotAttachment.tsx @@ -33,6 +33,8 @@ import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-dra import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon'; import PFHorizontalLogoColor from '../ChatbotHeader/PF-HorizontalLogo-Color.svg'; import PFHorizontalLogoReverse from '../ChatbotHeader/PF-HorizontalLogo-Reverse.svg'; +import PFIconLogoColor from '../ChatbotHeader/PF-IconLogo-Color.svg'; +import PFIconLogoReverse from '../ChatbotHeader/PF-IconLogo-Reverse.svg'; const footnoteProps = { label: 'Lightspeed uses AI. Check for mistakes.', @@ -193,6 +195,20 @@ export const BasicDemo: React.FunctionComponent = () => { setFile(undefined); }; + const horizontalLogo = ( + + + + + ); + + const iconLogo = ( + <> + + + + ); + return ( <> { alert('Menu toggle clicked')} /> - -
- -
-
- -
-
+ {displayMode === ChatbotDisplayMode.fullscreen ? horizontalLogo : iconLogo}
diff --git a/packages/module/src/ChatbotHeader/ChatbotHeader.scss b/packages/module/src/ChatbotHeader/ChatbotHeader.scss index 110d8d4..4e9d41f 100644 --- a/packages/module/src/ChatbotHeader/ChatbotHeader.scss +++ b/packages/module/src/ChatbotHeader/ChatbotHeader.scss @@ -9,6 +9,11 @@ // Title -or- Brand .pf-chatbot__title { + display: flex; + align-items: center; + .pf-v6-l-bullseye { + flex: 1; + } img { max-height: 40px; }