From ea970c2750ff56ec93bc81a7bdbeccce92d769fc Mon Sep 17 00:00:00 2001 From: KevinLatino Date: Sat, 2 Nov 2024 23:31:38 -0600 Subject: [PATCH] Feat: Ui-enhancement --- frontend/app/components/ui/card.tsx | 76 ++++++++++++++ frontend/app/components/ui/checkbox.tsx | 30 ++++++ frontend/app/components/ui/hero-section.tsx | 107 +++++++++++--------- frontend/app/components/ui/input.tsx | 25 +++++ frontend/app/components/ui/sidebar.tsx | 2 +- frontend/app/components/ui/slider.tsx | 28 +++++ frontend/app/marketplace/page.tsx | 32 +++--- 7 files changed, 233 insertions(+), 67 deletions(-) create mode 100644 frontend/app/components/ui/card.tsx create mode 100644 frontend/app/components/ui/checkbox.tsx create mode 100644 frontend/app/components/ui/input.tsx create mode 100644 frontend/app/components/ui/slider.tsx diff --git a/frontend/app/components/ui/card.tsx b/frontend/app/components/ui/card.tsx new file mode 100644 index 0000000..7500a1c --- /dev/null +++ b/frontend/app/components/ui/card.tsx @@ -0,0 +1,76 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +const Card = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +Card.displayName = "Card" + +const CardHeader = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +CardHeader.displayName = "CardHeader" + +const CardTitle = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)) +CardTitle.displayName = "CardTitle" + +const CardDescription = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)) +CardDescription.displayName = "CardDescription" + +const CardContent = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)) +CardContent.displayName = "CardContent" + +const CardFooter = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +CardFooter.displayName = "CardFooter" + +export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } \ No newline at end of file diff --git a/frontend/app/components/ui/checkbox.tsx b/frontend/app/components/ui/checkbox.tsx new file mode 100644 index 0000000..94d214f --- /dev/null +++ b/frontend/app/components/ui/checkbox.tsx @@ -0,0 +1,30 @@ +"use client" + +import * as React from "react" +import * as CheckboxPrimitive from "@radix-ui/react-checkbox" +import { Check } from "lucide-react" + +import { cn } from "@/lib/utils" + +const Checkbox = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + + + + +)) +Checkbox.displayName = CheckboxPrimitive.Root.displayName + +export { Checkbox } \ No newline at end of file diff --git a/frontend/app/components/ui/hero-section.tsx b/frontend/app/components/ui/hero-section.tsx index ae33cec..9b80d35 100644 --- a/frontend/app/components/ui/hero-section.tsx +++ b/frontend/app/components/ui/hero-section.tsx @@ -1,56 +1,63 @@ + import { Button } from "@/app/components/ui/button"; import { ArrowRight, Wallet } from "lucide-react"; +import Link from "next/link"; import * as React from "react"; export function HeroSection() { - return ( -
- {/* Gradient Background */} -
- - {/* Animated Grid Background */} -
- -
-
- - - - - Live on Stellar Network -
- -

- The Future of - Secure Trading -

- -

- Experience trustless trading with built-in Stellar escrow protection. - Your gateway to secure, decentralized commerce. -

- -
- - -
- - {/* Live Stats Ticker */} -
-
- - Network Status: Active -
-
24h Volume: $1.2M
-
Gas: 0.001 XLM
-
-
-
- ); + return ( +
+ {/* Gradient Background */} +
+ + {/* Animated Grid Background */} +
+ +
+
+ + + + + Live on Stellar Network +
+ +

+ The Future of + Secure Trading +

+ +

+ Experience trustless trading with built-in Stellar escrow protection. + Your gateway to secure, decentralized commerce. +

+ +
+ + + + +
+ + {/* Live Stats Ticker */} +
+
+ + Network Status: Active +
+
24h Volume: $1.2M
+
Gas: 0.001 XLM
+
+
+
+ ); } diff --git a/frontend/app/components/ui/input.tsx b/frontend/app/components/ui/input.tsx new file mode 100644 index 0000000..7030e99 --- /dev/null +++ b/frontend/app/components/ui/input.tsx @@ -0,0 +1,25 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +export interface InputProps + extends React.InputHTMLAttributes {} + +const Input = React.forwardRef( + ({ className, type, ...props }, ref) => { + return ( + + ) + } +) +Input.displayName = "Input" + +export { Input } \ No newline at end of file diff --git a/frontend/app/components/ui/sidebar.tsx b/frontend/app/components/ui/sidebar.tsx index 8e08efe..206228b 100644 --- a/frontend/app/components/ui/sidebar.tsx +++ b/frontend/app/components/ui/sidebar.tsx @@ -73,7 +73,7 @@ export const SidebarTrigger = React.forwardRef - + Toggle Sidebar ); diff --git a/frontend/app/components/ui/slider.tsx b/frontend/app/components/ui/slider.tsx new file mode 100644 index 0000000..43e5919 --- /dev/null +++ b/frontend/app/components/ui/slider.tsx @@ -0,0 +1,28 @@ +"use client" + +import * as React from "react" +import * as SliderPrimitive from "@radix-ui/react-slider" + +import { cn } from "@/lib/utils" + +const Slider = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + + + + + +)) +Slider.displayName = SliderPrimitive.Root.displayName + +export { Slider } \ No newline at end of file diff --git a/frontend/app/marketplace/page.tsx b/frontend/app/marketplace/page.tsx index f0f9062..178d7d5 100644 --- a/frontend/app/marketplace/page.tsx +++ b/frontend/app/marketplace/page.tsx @@ -86,14 +86,14 @@ function SidebarComponent({ priceRange, setPriceRange, selectedCategories, handl
-

Price range

+

Price range

${priceRange[0]} @@ -101,7 +101,7 @@ function SidebarComponent({ priceRange, setPriceRange, selectedCategories, handl
-

Categories

+

Categories

{["Electronics", "Furniture", "Appliances", "Sports"].map((category) => (
@@ -125,21 +125,21 @@ function HeaderComponent({ searchTerm, setSearchTerm }: HeaderComponentProps) { return (
- -
+
setSearchTerm(e.target.value)} - className="w-80 text-lg" + className="w-[16rem] h-[3rem]" /> -
@@ -150,19 +150,19 @@ function HeaderComponent({ searchTerm, setSearchTerm }: HeaderComponentProps) { function ProductList({ products }: ProductListProps) { return (
-

Products

+

Products

{products?.map((product) => ( - + - {product.name} + {product.name} -

{product.category}

+

{product.category}

- - ${product.price} - + + ${product.price} +
))}