feat: hexabot logo in the widget header

This commit is contained in:
Mohamed Marrouchi
2024-10-22 15:41:08 +01:00
parent 7b275c40f4
commit 79842f5f46
5 changed files with 81 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
.sc-header {
min-height: 75px;
min-height: 64px;
border-top-left-radius: 9px;
border-top-right-radius: 9px;
padding: 10px;
@@ -20,10 +20,9 @@
.sc-header--title {
align-self: center;
padding: 10px;
flex: 1;
user-select: none;
font-size: 20px;
font-size: 1.25rem;
}
.sc-header--title.enabled {

View File

@@ -12,8 +12,9 @@ import { useColors } from '../providers/ColorProvider';
import { useSettings } from '../providers/SettingsProvider';
import { useWidget } from '../providers/WidgetProvider';
import CloseIcon from './icons/CloseIcon';
import './ChatHeader.scss';
import CloseIcon from './icons/CloseIcon';
import OpenIcon from './icons/OpenIcon';
type ChatHeaderProps = PropsWithChildren;
@@ -31,13 +32,14 @@ const ChatHeader: FC<ChatHeaderProps> = ({ children }) => {
children
) : (
<>
{settings.titleImageUrl && (
<img
className="sc-header--img"
src={settings.titleImageUrl}
alt=""
/>
)}
<a
href="https://hexabot.ai"
target="_blank"
title="Powered By Hexabot.ai"
className="sc-header--img"
>
<OpenIcon width={32} height={32} />
</a>
<div className="sc-header--title">{settings.title}</div>
</>
)}

View File

@@ -67,7 +67,7 @@ const defaultSettings: ChatSettings = {
alwaysScrollToBottom: true,
focusOnOpen: true,
title: 'Hexabot :)',
titleImageUrl: 'https://i.pravatar.cc/300',
titleImageUrl: '',
inputDisabled: false,
placeholder: 'Write something...',
menu: [],