Skip to content

Commit

Permalink
feat: added basic components
Browse files Browse the repository at this point in the history
  • Loading branch information
SyedMSawaid committed Oct 23, 2024
1 parent be59f9e commit 8788bc4
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { useState } from "react";
import { ChatOptions } from "./components";
import { ChatPage } from "./pages";

function App() {
const [chat, setChat] = useState(true);

Check failure on line 6 in src/App.tsx

View workflow job for this annotation

GitHub Actions / deploy

'setChat' is declared but its value is never read.
return (
<>
<div>Mukalma</div>

{!chat ? <ChatOptions /> : <ChatPage />}
</>
);
}
Expand Down
6 changes: 6 additions & 0 deletions src/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { ComponentProps } from "react";

type Props = {} & ComponentProps<"button">;
export const Button = ({ children, ...props }: Props) => {
return <button {...props}>{children}</button>;
};
7 changes: 7 additions & 0 deletions src/components/ChatOptions.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const ChatOptions = () => {
return (
<div>
<div>Hi</div>
</div>
);
};
12 changes: 12 additions & 0 deletions src/components/Input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { ComponentProps } from "react";

type Props = {} & ComponentProps<"input">;

export const Input = ({ id }: Props) => {
return (
<div>
<label htmlFor={id}></label>
<input type="text" id={id} />
</div>
);
};
3 changes: 3 additions & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "./Input";
export * from "./Button";
export * from "./ChatOptions";
7 changes: 7 additions & 0 deletions src/pages/ChatPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const ChatPage = () => {
return (
<div>
<div>Chat Page</div>
</div>
);
};
1 change: 1 addition & 0 deletions src/pages/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./ChatPage";

0 comments on commit 8788bc4

Please sign in to comment.