|
|
|
@ -7,6 +7,8 @@ import {
|
|
|
|
} from '@heroicons/react/24/solid'
|
|
|
|
} from '@heroicons/react/24/solid'
|
|
|
|
export type IHeaderProps = {
|
|
|
|
export type IHeaderProps = {
|
|
|
|
title: string
|
|
|
|
title: string
|
|
|
|
|
|
|
|
icon: string
|
|
|
|
|
|
|
|
icon_background: string
|
|
|
|
isMobile?: boolean
|
|
|
|
isMobile?: boolean
|
|
|
|
onShowSideBar?: () => void
|
|
|
|
onShowSideBar?: () => void
|
|
|
|
onCreateNewChat?: () => void
|
|
|
|
onCreateNewChat?: () => void
|
|
|
|
@ -14,6 +16,8 @@ export type IHeaderProps = {
|
|
|
|
const Header: FC<IHeaderProps> = ({
|
|
|
|
const Header: FC<IHeaderProps> = ({
|
|
|
|
title,
|
|
|
|
title,
|
|
|
|
isMobile,
|
|
|
|
isMobile,
|
|
|
|
|
|
|
|
icon,
|
|
|
|
|
|
|
|
icon_background,
|
|
|
|
onShowSideBar,
|
|
|
|
onShowSideBar,
|
|
|
|
onCreateNewChat,
|
|
|
|
onCreateNewChat,
|
|
|
|
}) => {
|
|
|
|
}) => {
|
|
|
|
@ -28,7 +32,7 @@ const Header: FC<IHeaderProps> = ({
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
) : <div></div>}
|
|
|
|
) : <div></div>}
|
|
|
|
<div className='flex items-center space-x-2'>
|
|
|
|
<div className='flex items-center space-x-2'>
|
|
|
|
<AppIcon size="small" />
|
|
|
|
<AppIcon size="small" icon={icon} background={icon_background} />
|
|
|
|
<div className=" text-sm text-gray-800 font-bold">{title}</div>
|
|
|
|
<div className=" text-sm text-gray-800 font-bold">{title}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{isMobile ? (
|
|
|
|
{isMobile ? (
|
|
|
|
|