fixed heaer
This commit is contained in:
parent
933f6297a8
commit
94f87b9fee
3 changed files with 26 additions and 23 deletions
|
|
@ -14,7 +14,7 @@ export default function DownButton({ onClick }) {
|
||||||
return (
|
return (
|
||||||
<motion.button
|
<motion.button
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
className="bg-gray-700 p-2 rounded-2xl file-input border-2 border-gray-600 size-10"
|
className="bg-gray-700 p-2 rounded-2xl file-input border-2 border-gray-600"
|
||||||
whileHover={{ scale: 1.1 }}
|
whileHover={{ scale: 1.1 }}
|
||||||
whileTap={{ scale: 0.9 }}
|
whileTap={{ scale: 0.9 }}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,12 @@ import React, { useMemo, useState } from "react";
|
||||||
import { motion } from "motion/react";
|
import { motion } from "motion/react";
|
||||||
import { Rocket } from "lucide-react";
|
import { Rocket } from "lucide-react";
|
||||||
import DeleteButton from "src/components/ui/button/delete-button";
|
import DeleteButton from "src/components/ui/button/delete-button";
|
||||||
import SchematicButton from "../button/schematic-button";
|
import FileList from "src/components/ui/file/file-list";
|
||||||
|
|
||||||
export default function ChatHeader({ title = "Title of Chat", onDeleteAll }) {
|
export default function ChatHeader({
|
||||||
|
title = "Schematic Spelunker",
|
||||||
|
onDeleteAll,
|
||||||
|
}) {
|
||||||
const isDebug = useMemo(() => {
|
const isDebug = useMemo(() => {
|
||||||
const p = new URLSearchParams(window.location.search);
|
const p = new URLSearchParams(window.location.search);
|
||||||
return p.get("debug") === "1";
|
return p.get("debug") === "1";
|
||||||
|
|
@ -34,9 +37,8 @@ export default function ChatHeader({ title = "Title of Chat", onDeleteAll }) {
|
||||||
<div className="w-full flex justify-center">
|
<div className="w-full flex justify-center">
|
||||||
<header className="text-slate-100 fixed top-4 max-w-3xl w-full px-4">
|
<header className="text-slate-100 fixed top-4 max-w-3xl w-full px-4">
|
||||||
<div className="flex justify-between items-center gap-4">
|
<div className="flex justify-between items-center gap-4">
|
||||||
<SchematicButton />
|
<FileList />
|
||||||
<div className="flex items-center gap-3">
|
<h1 className=" text-sm lg:text-lg font-semibold shadow-md shadow-indigo-600 bg-gray-900 px-6 py-2 rounded-4xl border-2 border-gray-800">
|
||||||
<h1 className="text-lg font-semibold shadow-md shadow-indigo-600 bg-gray-900 px-6 py-2 rounded-4xl border-2 border-gray-800">
|
|
||||||
{title}
|
{title}
|
||||||
</h1>
|
</h1>
|
||||||
<DeleteButton onClick={onDeleteAll} />
|
<DeleteButton onClick={onDeleteAll} />
|
||||||
|
|
@ -53,7 +55,6 @@ export default function ChatHeader({ title = "Title of Chat", onDeleteAll }) {
|
||||||
</motion.button>
|
</motion.button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{toast && (
|
{toast && (
|
||||||
<div className="mt-2 text-xs text-slate-300 bg-gray-800/80 border border-gray-700 rounded px-2 py-1 inline-block">
|
<div className="mt-2 text-xs text-slate-300 bg-gray-800/80 border border-gray-700 rounded px-2 py-1 inline-block">
|
||||||
{toast}
|
{toast}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,9 @@ export default function MessageInput({ onSend }) {
|
||||||
<div className="w-full flex justify-center">
|
<div className="w-full flex justify-center">
|
||||||
<footer className="fixed bottom-6 max-w-3xl w-full px-4">
|
<footer className="fixed bottom-6 max-w-3xl w-full px-4">
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-4">
|
||||||
|
<div>
|
||||||
<DownButton></DownButton>
|
<DownButton></DownButton>
|
||||||
|
</div>
|
||||||
<form
|
<form
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
className="bg-gray-900 rounded-2xl border-2 border-gray-800 shadow-lg shadow-indigo-600"
|
className="bg-gray-900 rounded-2xl border-2 border-gray-800 shadow-lg shadow-indigo-600"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue