Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ChatbotHeader): Update logos #152

Open
wants to merge 1 commit into
base: v6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

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.',
Expand Down Expand Up @@ -94,7 +96,7 @@
content: markdown,
name: 'Bot'
}
] as any;

Check warning on line 99 in packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/Chatbot/Chatbot.tsx

View workflow job for this annotation

GitHub Actions / call-build-lint-test-workflow / lint

Unexpected any. Specify a different type

const welcomePrompts = [
{
Expand Down Expand Up @@ -130,6 +132,20 @@

const handleSend = (message) => alert(message);

const horizontalLogo = (
<Bullseye>
<Brand className="show-light" src={PFHorizontalLogoColor} alt="PatternFly" />
<Brand className="show-dark" src={PFHorizontalLogoReverse} alt="PatternFly" />
</Bullseye>
);

const iconLogo = (
<>
<Brand className="show-light" src={PFIconLogoColor} alt="PatternFly" />
<Brand className="show-dark" src={PFIconLogoReverse} alt="PatternFly" />
</>
);

return (
<>
<ChatbotToggle
Expand All @@ -141,14 +157,7 @@
<ChatbotHeader>
<ChatbotHeaderMenu onMenuToggle={() => alert('Menu toggle clicked')} />
<ChatbotHeaderTitle>
<Bullseye>
<div className="show-light">
<Brand src={PFHorizontalLogoColor} alt="PatternFly" />
</div>
<div className="show-dark">
<Brand src={PFHorizontalLogoReverse} alt="PatternFly" />
</div>
</Bullseye>
{displayMode === ChatbotDisplayMode.fullscreen ? horizontalLogo : iconLogo}
</ChatbotHeaderTitle>
<ChatbotHeaderActions>
<ChatbotHeaderSelectorDropdown value={selectedModel} onSelect={onSelectModel}>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down Expand Up @@ -193,6 +195,20 @@ export const BasicDemo: React.FunctionComponent = () => {
setFile(undefined);
};

const horizontalLogo = (
<Bullseye>
<Brand className="show-light" src={PFHorizontalLogoColor} alt="PatternFly" />
<Brand className="show-dark" src={PFHorizontalLogoReverse} alt="PatternFly" />
</Bullseye>
);

const iconLogo = (
<>
<Brand className="show-light" src={PFIconLogoColor} alt="PatternFly" />
<Brand className="show-dark" src={PFIconLogoReverse} alt="PatternFly" />
</>
);

return (
<>
<ChatbotToggle
Expand All @@ -210,14 +226,7 @@ export const BasicDemo: React.FunctionComponent = () => {
<ChatbotHeader>
<ChatbotHeaderMenu onMenuToggle={() => alert('Menu toggle clicked')} />
<ChatbotHeaderTitle>
<Bullseye>
<div className="show-light">
<Brand src={PFHorizontalLogoColor} alt="PatternFly" />
</div>
<div className="show-dark">
<Brand src={PFHorizontalLogoReverse} alt="PatternFly" />
</div>
</Bullseye>
{displayMode === ChatbotDisplayMode.fullscreen ? horizontalLogo : iconLogo}
</ChatbotHeaderTitle>
<ChatbotHeaderActions>
<ChatbotHeaderSelectorDropdown value={selectedModel} onSelect={onSelectModel}>
Expand Down
5 changes: 5 additions & 0 deletions packages/module/src/ChatbotHeader/ChatbotHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading