edit add, delete button
This commit is contained in:
parent
807d1f27ac
commit
4989d30ec3
4 changed files with 13 additions and 6 deletions
|
|
@ -2,7 +2,7 @@ import React, { useState } from "react";
|
||||||
import ChatHeader from "src/components/ui/chat/chat-header";
|
import ChatHeader from "src/components/ui/chat/chat-header";
|
||||||
import ChatWindow from "src/components/ui/chat/chat-window";
|
import ChatWindow from "src/components/ui/chat/chat-window";
|
||||||
import MessageInput from "src/components/ui/chat/message-input";
|
import MessageInput from "src/components/ui/chat/message-input";
|
||||||
|
import '../../index.css'
|
||||||
export default function ChatLayout() {
|
export default function ChatLayout() {
|
||||||
const [messages, setMessages] = useState([
|
const [messages, setMessages] = useState([
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,15 @@ export default function ChatHeader({ title = "AI Assistant" }) {
|
||||||
Ask anything — AI is listening
|
Ask anything — AI is listening
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<ActionButton children='New Chat' type="add" onClick={handleNewChat}></ActionButton>
|
</div>
|
||||||
<ActionButton children='Delete Chat'type="delete" onClick={handleDeleteChat}></ActionButton>
|
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<ActionButton type="add" onClick={handleNewChat}>
|
||||||
|
New Chat
|
||||||
|
</ActionButton>
|
||||||
|
<ActionButton type="delete" onClick={handleDeleteChat}>
|
||||||
|
Delete Chat
|
||||||
|
</ActionButton>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import React, { useRef, useEffect } from "react";
|
import React, { useRef, useEffect } from "react";
|
||||||
|
|
||||||
|
|
||||||
function MessageBubble({ message }) {
|
function MessageBubble({ message }) {
|
||||||
const isUser = message.role === "user";
|
const isUser = message.role === "user";
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
@import "tailwindcss/preflight";
|
@tailwind base;
|
||||||
@import "tailwindcss/utilities";
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--color-primary: 15 40 98;
|
--color-primary: 15 40 98;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue