style(footer+header): made both sticky
This commit is contained in:
parent
848f27b29b
commit
3661874789
4 changed files with 38 additions and 31 deletions
|
|
@ -3,9 +3,7 @@ import React, { useRef, useEffect } from "react";
|
|||
function MessageBubble({ message }) {
|
||||
const isUser = message.role === "user";
|
||||
return (
|
||||
<div
|
||||
className={`flex ${isUser ? "justify-end" : "justify-start"} px-4 py-8`}
|
||||
>
|
||||
<div className={`flex ${isUser ? "justify-end" : "justify-start"} py-2`}>
|
||||
<div
|
||||
className={`max-w-[70%] p-3 rounded-lg ${isUser ? "bg-indigo-600 text-white" : "bg-gray-700 text-slate-100"}`}
|
||||
>
|
||||
|
|
@ -17,7 +15,7 @@ function MessageBubble({ message }) {
|
|||
|
||||
export default function ChatWindow({ messages }) {
|
||||
return (
|
||||
<div className="flex-1 overflow-auto p-2">
|
||||
<div className="flex-1 overflow-auto px-2 pb-16">
|
||||
<div className="">
|
||||
{messages.map((m, i) => (
|
||||
<MessageBubble key={i} message={m} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue