forked from GoogleCloudPlatform/generative-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81db3c2
commit ebc5b40
Showing
1 changed file
with
39 additions
and
40 deletions.
There are no files selected for viewing
79 changes: 39 additions & 40 deletions
79
search/grounded-generation-playground/src/components/ui/page-header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,53 @@ | ||
/** | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { Button } from '@/components/ui/button'; | ||
import { Menu } from 'lucide-react'; | ||
import { Helmet } from 'react-helmet'; | ||
|
||
interface PageHeaderProps { | ||
toggleSidebar: () => void; | ||
} | ||
|
||
const PageHeader: React.FC<PageHeaderProps> = ({ toggleSidebar }) => { | ||
return ( | ||
<> | ||
<Helmet> | ||
<style> | ||
{` | ||
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap'); | ||
.google-sans-header { | ||
font-family: "Google Sans", sans-serif; | ||
font-optical-sizing: auto; | ||
font-weight: 500; | ||
font-style: normal; | ||
font-variation-settings: "GRAD" 0; | ||
} | ||
`} | ||
</style> | ||
</Helmet> | ||
<header className="bg-zinc-900 shadow-md border-b border-zinc-800"> | ||
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8"> | ||
<div className="flex items-center justify-between"> | ||
<h1 | ||
className="text-2xl google-sans-header text-transparent bg-clip-text" | ||
style={{ | ||
backgroundImage: 'linear-gradient(72.83deg, #4285F4 11.63%, #9b72cb 40.43%, #d96570 68.07%)', | ||
}} | ||
> | ||
Vertex AI Search Grounded Generation Playground | ||
</h1> | ||
<Button | ||
variant="ghost" | ||
size="icon" | ||
onClick={toggleSidebar} | ||
className="lg:hidden text-white" | ||
> | ||
<Menu className="h-6 w-6" /> | ||
</Button> | ||
</div> | ||
<header className="bg-zinc-900 shadow-md border-b border-zinc-800"> | ||
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8"> | ||
<div className="flex items-center justify-between"> | ||
<h1 | ||
className="text-2xl font-semibold text-transparent bg-clip-text" | ||
style={{ | ||
backgroundImage: | ||
'linear-gradient(72.83deg, #4285F4 11.63%, #9b72cb 40.43%, #d96570 68.07%)', | ||
}} | ||
> | ||
Vertex AI Search Grounded Generation Playground | ||
</h1> | ||
<Button | ||
variant="ghost" | ||
size="icon" | ||
onClick={toggleSidebar} | ||
className="lg:hidden text-white" | ||
> | ||
<Menu className="h-6 w-6" /> | ||
</Button> | ||
</div> | ||
</header> | ||
</> | ||
</div> | ||
</header> | ||
); | ||
}; | ||
|
||
export default PageHeader; | ||
export default PageHeader; |