From d07090f27cb7a622a98eab35f6937f9f00c4d4b3 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Sat, 18 Nov 2023 20:00:54 -0300 Subject: [PATCH] PageLayout fixed to have buttons --- .../src/components/pageLayout/index.tsx | 11 ++++-- .../src/modals/StoreApiKeyModal/index.tsx | 2 +- src/frontend/src/pages/StorePage/index.tsx | 37 +++++++++++-------- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/frontend/src/components/pageLayout/index.tsx b/src/frontend/src/components/pageLayout/index.tsx index d89f38c10..2a22fa8c4 100644 --- a/src/frontend/src/components/pageLayout/index.tsx +++ b/src/frontend/src/components/pageLayout/index.tsx @@ -5,18 +5,23 @@ export default function PageLayout({ title, description, children, + button, }: { title: string; description: string; children: React.ReactNode; + button?: React.ReactNode; }) { return (
-
-

{title}

-

{description}

+
+
+

{title}

+

{description}

+
+
{button && button}
{children} diff --git a/src/frontend/src/modals/StoreApiKeyModal/index.tsx b/src/frontend/src/modals/StoreApiKeyModal/index.tsx index 1832e0da6..ffba35c2d 100644 --- a/src/frontend/src/modals/StoreApiKeyModal/index.tsx +++ b/src/frontend/src/modals/StoreApiKeyModal/index.tsx @@ -43,7 +43,7 @@ export default function StoreApiKeyModal({ return ( - {children} + {children} - - - )}} */ + button={ + <> + {StoreApiKeyModal && ( + + + + )} + + } >