From 8788bc4ff593b19c8ee1471465a2c6cfe406fbdf Mon Sep 17 00:00:00 2001 From: "Syed M. Sawaid" <34231494+SyedMSawaid@users.noreply.github.com> Date: Wed, 23 Oct 2024 20:29:56 +0200 Subject: [PATCH] feat: added basic components --- src/App.tsx | 7 +++++++ src/components/Button.tsx | 6 ++++++ src/components/ChatOptions.tsx | 7 +++++++ src/components/Input.tsx | 12 ++++++++++++ src/components/index.ts | 3 +++ src/pages/ChatPage.tsx | 7 +++++++ src/pages/index.ts | 1 + 7 files changed, 43 insertions(+) create mode 100644 src/components/Button.tsx create mode 100644 src/components/ChatOptions.tsx create mode 100644 src/components/Input.tsx create mode 100644 src/components/index.ts create mode 100644 src/pages/ChatPage.tsx create mode 100644 src/pages/index.ts diff --git a/src/App.tsx b/src/App.tsx index a6f786a..e32eb08 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,14 @@ +import { useState } from "react"; +import { ChatOptions } from "./components"; +import { ChatPage } from "./pages"; + function App() { + const [chat, setChat] = useState(true); return ( <>
Mukalma
+ + {!chat ? : } ); } diff --git a/src/components/Button.tsx b/src/components/Button.tsx new file mode 100644 index 0000000..e17c230 --- /dev/null +++ b/src/components/Button.tsx @@ -0,0 +1,6 @@ +import { ComponentProps } from "react"; + +type Props = {} & ComponentProps<"button">; +export const Button = ({ children, ...props }: Props) => { + return ; +}; diff --git a/src/components/ChatOptions.tsx b/src/components/ChatOptions.tsx new file mode 100644 index 0000000..1ac7fa0 --- /dev/null +++ b/src/components/ChatOptions.tsx @@ -0,0 +1,7 @@ +export const ChatOptions = () => { + return ( +
+
Hi
+
+ ); +}; diff --git a/src/components/Input.tsx b/src/components/Input.tsx new file mode 100644 index 0000000..d994fe8 --- /dev/null +++ b/src/components/Input.tsx @@ -0,0 +1,12 @@ +import { ComponentProps } from "react"; + +type Props = {} & ComponentProps<"input">; + +export const Input = ({ id }: Props) => { + return ( +
+ + +
+ ); +}; diff --git a/src/components/index.ts b/src/components/index.ts new file mode 100644 index 0000000..aab55d2 --- /dev/null +++ b/src/components/index.ts @@ -0,0 +1,3 @@ +export * from "./Input"; +export * from "./Button"; +export * from "./ChatOptions"; diff --git a/src/pages/ChatPage.tsx b/src/pages/ChatPage.tsx new file mode 100644 index 0000000..2fadc8d --- /dev/null +++ b/src/pages/ChatPage.tsx @@ -0,0 +1,7 @@ +export const ChatPage = () => { + return ( +
+
Chat Page
+
+ ); +}; diff --git a/src/pages/index.ts b/src/pages/index.ts new file mode 100644 index 0000000..68c7752 --- /dev/null +++ b/src/pages/index.ts @@ -0,0 +1 @@ +export * from "./ChatPage";