diff --git a/src/app/globals.css b/src/app/globals.css index 307df89..4db1fb8 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -69,7 +69,7 @@ --secondary-foreground: oklch(0.96 0 0); /* Muted / subtle text */ - --muted: oklch(0.24 0.015 260); + --muted: oklch(22.068% 0.01327 258.402); --muted-foreground: oklch(0.72 0.01 260); /* Accent – SOL mint */ diff --git a/src/app/markets/components/PairsCard.tsx b/src/app/markets/components/PairsCard.tsx index f23b176..ba62ff1 100644 --- a/src/app/markets/components/PairsCard.tsx +++ b/src/app/markets/components/PairsCard.tsx @@ -1,11 +1,12 @@ import { SolanaLogo } from "@/components/logos"; import { Button } from "@/components/ui/button"; -import { Card, CardHeader, CardTitle } from "@/components/ui/card"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Settings2Icon, ZapIcon } from "lucide-react"; +import TokenCard from "./TokenCard"; export default function PairsCard({ title }: { title: string }) { return ( - + {title}
@@ -38,6 +39,11 @@ export default function PairsCard({ title }: { title: string }) {
+ + +
); } diff --git a/src/app/markets/components/TokenCard.tsx b/src/app/markets/components/TokenCard.tsx new file mode 100644 index 0000000..9ba14dd --- /dev/null +++ b/src/app/markets/components/TokenCard.tsx @@ -0,0 +1,112 @@ +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; +import { cn } from "@/lib/utils"; +import { Token, TokenLiveData } from "@/modules/tokens/types"; +import { + BoxesIcon, + ChefHatIcon, + CoinsIcon, + CopyIcon, + CrosshairIcon, + EyeIcon, + GhostIcon, + IconNode, + LucideIcon, + UsersIcon, + UserStarIcon, + ZapIcon, +} from "lucide-react"; + +export default function TokenCard({ token }: { token: Token }) { + const live: TokenLiveData = { + topHolder: 23, + devHold: 10, + snipersHold: 4, + insidersHold: 2, + bundleHold: 3, + }; + + return ( +
+
+ {token.logoURI ? ( + Token + ) : ( +
+ +
+ )} +

+
+
+
+

{token.symbol}

+

+ {token.name} +

+
+
+

20m

+

+ + 10 +

+

+ + 10 +

+
+
+ + + + + +
+
+
+ + + +
+
+ ); +} + +function TokenBadge({ + value, + icon: Icon, + redWhen = 10, +}: { + value: number; + icon: LucideIcon; + redWhen?: number; +}) { + return ( + redWhen ? "text-red-400" : "text-green-500", + )} + > + + {value}% + + ); +} + +function TokenDigit({ name, value }: { name: string; value: string }) { + return ( +
+

{name}

+

{value}

+
+ ); +} diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx new file mode 100644 index 0000000..beb56ed --- /dev/null +++ b/src/components/ui/badge.tsx @@ -0,0 +1,48 @@ +import * as React from "react" +import { cva, type VariantProps } from "class-variance-authority" +import { Slot } from "radix-ui" + +import { cn } from "@/lib/utils" + +const badgeVariants = cva( + "inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90", + secondary: + "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", + destructive: + "bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", + outline: + "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + link: "text-primary underline-offset-4 [a&]:hover:underline", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Badge({ + className, + variant = "default", + asChild = false, + ...props +}: React.ComponentProps<"span"> & + VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot.Root : "span" + + return ( + + ) +} + +export { Badge, badgeVariants } diff --git a/src/modules/tokens/types.ts b/src/modules/tokens/types.ts new file mode 100644 index 0000000..958be07 --- /dev/null +++ b/src/modules/tokens/types.ts @@ -0,0 +1,14 @@ +export interface Token { + mint: string; + symbol: string; + name: string; + logoURI?: string; +} + +export interface TokenLiveData { + topHolder: number; + devHold: number; + snipersHold: number; + insidersHold: number; + bundleHold: number; +}