From 7f9d28c4e146f1c37c7d5ec0dcea8f4a90949f62 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Wed, 1 Nov 2023 23:30:33 -0300 Subject: [PATCH] Fixed market card design --- src/frontend/src/components/ui/button.tsx | 1 + src/frontend/src/components/ui/card.tsx | 2 +- .../StorePage/components/market-card.tsx | 161 ++++++++---------- src/frontend/src/style/applies.css | 8 +- 4 files changed, 76 insertions(+), 96 deletions(-) diff --git a/src/frontend/src/components/ui/button.tsx b/src/frontend/src/components/ui/button.tsx index becc8d5f1..031e7527c 100644 --- a/src/frontend/src/components/ui/button.tsx +++ b/src/frontend/src/components/ui/button.tsx @@ -23,6 +23,7 @@ const buttonVariants = cva( size: { default: "h-10 py-2 px-4", sm: "h-9 px-3 rounded-md", + xs: "py-1 px-1 rounded-md", lg: "h-11 px-8 rounded-md", }, }, diff --git a/src/frontend/src/components/ui/card.tsx b/src/frontend/src/components/ui/card.tsx index c904310cd..459396f46 100644 --- a/src/frontend/src/components/ui/card.tsx +++ b/src/frontend/src/components/ui/card.tsx @@ -8,7 +8,7 @@ const Card = React.forwardRef<
{ {data.name} - - Free - +
+ + + + {totalComponentsMetadata()} + + + + + + {likes_count ?? 0} + + + + + + {data.downloads_count} + + +
@@ -139,103 +158,63 @@ export const MarketCardComponent = ({ data }: { data: storeComponent }) => {
-
- - {data.tags - .sort((a, b) => a.name.length - b.name.length) - .map((tag, index) => ( -
- - {tag.name} - -
- ))} -
- } - > -
- {data.tags.length > 0 ? ( - - {data.tags.map((tag, index) => ( - - {tag.name} - - ))} - - ) : ( - - - - - )} -
- - - - - {totalComponentsMetadata()} - - - -
+
+ + + - - - - {data.downloads_count} - + +
-
diff --git a/src/frontend/src/style/applies.css b/src/frontend/src/style/applies.css index aedb23c28..7c5c66ebe 100644 --- a/src/frontend/src/style/applies.css +++ b/src/frontend/src/style/applies.css @@ -205,15 +205,15 @@ } .loading-page-panel { - @apply flex h-full w-full items-center justify-center bg-muted; + @apply flex h-full w-full items-center justify-center bg-background; } .main-page-panel { - @apply flex-max-width h-full flex-col overflow-auto bg-muted px-16; + @apply flex-max-width h-full flex-col overflow-auto bg-background px-16; } .admin-page-panel { - @apply flex-max-width h-full flex-col overflow-auto bg-muted px-16; + @apply flex-max-width h-full flex-col overflow-auto bg-background px-16; } .main-page-nav-arrangement { @@ -241,7 +241,7 @@ } .community-page-arrangement { - @apply flex-max-width h-full flex-col overflow-auto bg-muted px-16; + @apply flex-max-width h-full flex-col overflow-auto bg-background px-16; } .community-page-nav-arrangement {