bolt.new/packages/bolt/app/components/header/Header.tsx

28 lines
889 B
TypeScript
Raw Normal View History

import { useStore } from '@nanostores/react';
import { ClientOnly } from 'remix-utils/client-only';
import { chatStore } from '~/lib/stores/chat';
import { classNames } from '~/utils/classNames';
import { OpenStackBlitz } from './OpenStackBlitz.client';
2024-07-10 16:44:39 +00:00
export function Header() {
const chat = useStore(chatStore);
2024-07-10 16:44:39 +00:00
return (
<header
className={classNames('flex items-center bg-white p-5 border-b h-[var(--header-height)]', {
'border-transparent': !chat.started,
'border-gray-200': chat.started,
})}
>
2024-07-10 16:44:39 +00:00
<div className="flex items-center gap-2">
2024-07-31 21:21:40 +00:00
<a href="/" className="text-2xl font-semibold text-accent">
<img src="/logo_text.svg" width="60px" alt="Bolt Logo" />
2024-07-31 21:21:40 +00:00
</a>
2024-07-10 16:44:39 +00:00
</div>
2024-07-29 18:31:45 +00:00
<div className="ml-auto flex gap-2">
<ClientOnly>{() => <OpenStackBlitz />}</ClientOnly>
</div>
2024-07-10 16:44:39 +00:00
</header>
);
}