String and chat nodes added, handles design changed
This commit is contained in:
parent
b7718153bb
commit
3f7fb8a1b4
9 changed files with 180 additions and 31 deletions
|
|
@ -6,7 +6,7 @@ import {
|
|||
} from "@heroicons/react/24/outline";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function Chat() {
|
||||
export default function Chat({nodes, edges}) {
|
||||
const [open, setOpen] = useState(true);
|
||||
return (
|
||||
<>
|
||||
|
|
@ -53,7 +53,7 @@ export default function Chat() {
|
|||
placeholder="Send a message..."
|
||||
/>
|
||||
<div className="absolute inset-y-0 right-0 flex items-center pr-3">
|
||||
<button>
|
||||
<button onClick={() => {console.log(nodes, edges)}}>
|
||||
<PaperAirplaneIcon
|
||||
className="h-5 w-5 text-gray-400 hover:text-gray-600"
|
||||
aria-hidden="true"
|
||||
|
|
|
|||
|
|
@ -1,20 +1,14 @@
|
|||
export default function Input({title, placeholder, onChange, value}){
|
||||
export default function Input({onChange}){
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700">
|
||||
{title}
|
||||
</label>
|
||||
<div className="mt-1">
|
||||
<input
|
||||
value={(value as string)?.length>0?value:""}
|
||||
type="text"
|
||||
className="block w-full form-input rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
placeholder={placeholder}
|
||||
onChange={onChange}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
className="block w-full form-input rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
placeholder="Type a text"
|
||||
onChange={(e) => {
|
||||
onChange(e.target.value);
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue