From 77e62c36b29e8e621ef3f351fdde0cd8ea86345a Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 26 May 2023 10:02:45 +0100 Subject: [PATCH] Added portfolio modal --- src/app/components/PlusIcon.tsx | 4 +- src/app/components/home/AddNewCard.tsx | 18 ++++- src/app/components/home/CardTiles.tsx | 2 +- src/app/components/home/NewPortfolioModal.tsx | 80 +++++++++++++++++++ tailwind.config.js | 1 + 5 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 src/app/components/home/NewPortfolioModal.tsx diff --git a/src/app/components/PlusIcon.tsx b/src/app/components/PlusIcon.tsx index b605b1c1..2b1fe742 100644 --- a/src/app/components/PlusIcon.tsx +++ b/src/app/components/PlusIcon.tsx @@ -1,7 +1,7 @@ const PlusIcon = ({ color = "black" }: { color: string }) => ( { - const image = "home-add-new.svg"; const title = "New Portfolio"; - const budget = ""; + const [isModalOpen, setModalIsOpen] = useState(false); + + const openModal = () => { + console.log("open modal"); + setModalIsOpen(true); + }; + return ( - +
+

{`${title}`}

-
{budget}
diff --git a/src/app/components/home/CardTiles.tsx b/src/app/components/home/CardTiles.tsx index 74c71099..cf90ed23 100644 --- a/src/app/components/home/CardTiles.tsx +++ b/src/app/components/home/CardTiles.tsx @@ -20,7 +20,7 @@ export default function CardTiles({ {Portfolios.map((portfolio, index) => { if (index === 0) return ; - const image_idx = index % 3; + const image_idx = index % 4; return ( void; +}) { + function closeModal() { + setIsOpen(false); + } + + function createPortfolio() { + // TODO: This will be a server action that will create a new portfolio in the database + console.log("create portfolio"); + } + + return ( + <> + + + +
+ + +
+
+ + + + Create a new portfolio + +
TeXT
+ +
+ + +
+
+
+
+
+
+
+ + ); +} diff --git a/tailwind.config.js b/tailwind.config.js index 6e83babd..831a3d50 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -16,6 +16,7 @@ module.exports = { brandblue: "#14163d", hoverblue: "#3e4073", brandtan: "#d3b488", + hovertan: "#947750", brandbrown: "#3d1e05", brandmidblue: "#3943b7", },