From 0cf2669368e6ba9c4ec0f7d2ade5c2402b789789 Mon Sep 17 00:00:00 2001 From: Rishab Pillai Date: Mon, 21 Oct 2024 18:44:30 -0700 Subject: [PATCH 1/4] Button component --- src/app/page.tsx | 6 +++--- src/components/Button.tsx | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 src/components/Button.tsx diff --git a/src/app/page.tsx b/src/app/page.tsx index db7393c..d4649f1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,8 +1,8 @@ +import Button from "@/components/Button"; + const Home = () => { return ( -
- Hello World -
+
); }; diff --git a/src/components/Button.tsx b/src/components/Button.tsx new file mode 100644 index 0000000..b20b350 --- /dev/null +++ b/src/components/Button.tsx @@ -0,0 +1,17 @@ +import Link from "next/link"; +import React from "react"; + +interface ButtonProps { + text: string; + link: string; +} + +const Button = ({ text, link }: ButtonProps) => { + return ( +
+ {text} +
+ ); +}; + +export default Button; From 5e64fb62db03237a620dd582f90763742f99ca38 Mon Sep 17 00:00:00 2001 From: Rishab Pillai Date: Mon, 21 Oct 2024 18:45:03 -0700 Subject: [PATCH 2/4] Button component --- src/app/page.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index d4649f1..f8c1b22 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,5 +1,3 @@ -import Button from "@/components/Button"; - const Home = () => { return (
From 90c651e50fadfd363e01f9aa0edc3f76d9eda28d Mon Sep 17 00:00:00 2001 From: Rishab Pillai Date: Mon, 21 Oct 2024 19:16:25 -0700 Subject: [PATCH 3/4] modified button --- src/app/page.tsx | 4 +++- src/components/Button.tsx | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index f8c1b22..db7393c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,6 +1,8 @@ const Home = () => { return ( -
+
+ Hello World +
); }; diff --git a/src/components/Button.tsx b/src/components/Button.tsx index b20b350..29bfdbc 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,16 +1,18 @@ -import Link from "next/link"; import React from "react"; interface ButtonProps { text: string; - link: string; + onClick: (params: string) => void; } -const Button = ({ text, link }: ButtonProps) => { +const Button: React.FC = ({ text, onClick }) => { return ( -
- {text} -
+ ); }; From c7967660b75a03dcd3d653cddfef2c599064e708 Mon Sep 17 00:00:00 2001 From: Rishab Pillai Date: Mon, 21 Oct 2024 19:19:11 -0700 Subject: [PATCH 4/4] modified button further --- src/components/Button.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 29bfdbc..5ab3354 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -2,14 +2,14 @@ import React from "react"; interface ButtonProps { text: string; - onClick: (params: string) => void; + onClick: () => void; } const Button: React.FC = ({ text, onClick }) => { return (