From 10ac36ee7b2d3b5ef58b9b9f77b4c23e795390a6 Mon Sep 17 00:00:00 2001 From: ajaythapliyal Date: Sat, 18 Feb 2023 16:52:14 +0530 Subject: [PATCH] simplifies the APIKeyModal communication and state management, adds conversation components --- frontend/src/Avatar.tsx | 9 +++++++ frontend/src/Navigation.tsx | 4 +-- frontend/src/assets/send.svg | 3 +++ frontend/src/conversation/Conversation.tsx | 25 +++++++++++++++++-- .../src/conversation/ConversationBubble.tsx | 25 +++++++++++++++++++ .../src/conversation/ConversationInput.tsx | 21 ++++++++++++++++ frontend/src/models/misc.ts | 4 +++ frontend/tailwind.config.cjs | 1 + 8 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 frontend/src/Avatar.tsx create mode 100644 frontend/src/assets/send.svg create mode 100644 frontend/src/conversation/ConversationBubble.tsx create mode 100644 frontend/src/conversation/ConversationInput.tsx diff --git a/frontend/src/Avatar.tsx b/frontend/src/Avatar.tsx new file mode 100644 index 0000000..123b383 --- /dev/null +++ b/frontend/src/Avatar.tsx @@ -0,0 +1,9 @@ +export default function Avatar({ + avatar, + size, +}: { + avatar: string; + size?: 'SMALL' | 'MEDIUM' | 'LARGE'; +}) { + return
{avatar}
; +} diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index dcb09bd..4856393 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -25,7 +25,7 @@ export default function Navigation({ isApiKeySet ? 'INACTIVE' : 'ACTIVE', ); const openNav = ( -
+