Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
improve ui
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedivy committed Aug 22, 2023
1 parent cb0eef9 commit c82b7bd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/(portal)/quotes/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async function Page() {
<div className="flex flex-col gap-3">
<h1 className="text-3xl font-black">Quotes</h1>
<p className="text-muted-foreground text-xl">
Symbols you are tracking and their real time stats
Symbols you are tracking and their prices
</p>
</div>
<Button asChild className="font-bold" size="lg">
Expand Down
29 changes: 17 additions & 12 deletions components/quote-card.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import Link from "next/link";
import { Card, CardContent } from "./ui/card";

function Price({ price, color }) {
Expand All @@ -10,11 +11,11 @@ function Price({ price, color }) {
const first = priceString.slice(0, -3);

return (
<p className={`text-md lg:text-2xl font-bold ${color}`}>
<p className={`text-md lg:text-xl font-semibold ${color}`}>
<span>{first}</span>
<span className="text-xl lg:text-4xl">
<span className="text-lg lg:text-2xl">
{second}
<sup className="text-md lg:text-2xl">{third}</sup>
<sup className="text-md lg:text-xl">{third}</sup>
</span>
</p>
);
Expand All @@ -31,15 +32,19 @@ function QuoteCard({
const bidColor = bidPriceIncreased ? "text-blue-500" : "text-red-500";

return (
<Card className="shadow-none rounded-lg border-0 lg:border">
<CardContent className="w-full flex justify-between py-6 lg:py-8 px-0 lg:px-8 items-center">
<p className="text-xl lg:text-3xl font-bold lg:font-black">{symbol}</p>
<div className="flex gap-6 items-center">
<Price price={ask} color={askColor} />
<Price price={bid} color={bidColor} />
</div>
</CardContent>
</Card>
<Link href={`/trades/${symbol}`} passHref>
<Card className="shadow-none rounded-lg border-0 lg:border lg:hover:bg-accent cursor-pointer">
<CardContent className="w-full flex justify-between py-6 lg:py-8 px-0 lg:px-8 items-center">
<p className="text-lg lg:text-2xl font-semibold lg:font-bold">
{symbol}
</p>
<div className="flex gap-6 items-center">
<Price price={ask} color={askColor} />
<Price price={bid} color={bidColor} />
</div>
</CardContent>
</Card>
</Link>
);
}

Expand Down

0 comments on commit c82b7bd

Please sign in to comment.