media inq, advanced react charting

This commit is contained in:
2024-03-03 14:35:30 -05:00
parent 459299c6a6
commit 1bd646805c
12 changed files with 232 additions and 2040 deletions
@@ -9,7 +9,7 @@ interface HomepageModuleProps {
const HomepageModule = ({ title, children }: HomepageModuleProps) => {
return (
<div className="flex flex-col h-full bg-[rgb(19,20,25)] rounded-lg">
<div className="flex flex-col h-80 bg-[rgb(19,20,25)] rounded-lg 2xl:h-full">
<div className="flex justify-between px-2 py-2 pb-0">
<div className="flex items-center text-lg px-2 font-semibold">
{title}
+16 -14
View File
@@ -21,7 +21,9 @@ export const PortfolioModule = () => {
<div className="rounded-full bg-neutral-900 px-4">2W 1M YTD</div>
<div className="text-green-500">^10.0% $3,412.09</div>
</div>
<PortfolioChart data={portfolioData} />
<div className="h-3/4">
<PortfolioChart data={portfolioData} />
</div>
<div className="flex justify-between">
<Button className="text-white" variant="link">
Go to Portfolio
@@ -51,39 +53,39 @@ export const HeatmapModule = () => {
export const MoversModule = () => {
return (
<HomepageModule title="Movers">
<div className="flex justify-between px-8">
<div className="mt-6">
<div className="flex justify-between 2xl:px-8">
<div className="px-4 mt-4 2xl:mt-6">
<div className="text-lg">Gainers</div>
<div className="mt-4 grid grid-cols-2 grid-rows-5 gap-y-6 gap-x-10">
<div className="mt-4 grid grid-cols-2 grid-rows-5 gap-y-4 gap-x-2 2xl:gap-y-6 2xl:gap-x-10">
{winnerMovers.map((item) => (
<div
className="flex border-b border-neutral-400 pb-1"
className="flex border-b border-neutral-400 pb-1 text-sm 2xl:text-base"
key={item.symbol}
>
<div className="w-24 font-bold">{item.symbol}</div>
<div className="w-20 text-right text-neutral-400">
<div className="w-32 font-bold 2xl:w-24">{item.symbol}</div>
<div className="text-xs text-right text-neutral-400 2xl:w-20">
{item.stockPrice}
</div>
<div className="ml-4 rounded-lg bg-green-700 bg-opacity-90 w-16 text-center">
<div className="text-xs ml-2 rounded-lg bg-green-700 bg-opacity-90 w-20 text-center 2xl:ml-4">
+{item.percentChange}%
</div>
</div>
))}
</div>
</div>
<div className="mt-6">
<div className="px-4 mt-4 2xl:mt-6">
<div className="text-lg">Losers</div>
<div className="mt-4 grid grid-cols-2 grid-rows-5 gap-y-6 gap-x-10">
<div className="mt-4 grid grid-cols-2 grid-rows-5 gap-y-4 gap-x-2 2xl:gap-y-6 2xl:gap-x-10">
{loserMovers.map((item) => (
<div
className="flex border-b border-neutral-400 pb-1"
className="flex border-b border-neutral-400 pb-1 text-sm 2xl:text-base"
key={item.symbol}
>
<div className="w-24 font-bold">{item.symbol}</div>
<div className="w-20 text-right text-neutral-400">
<div className="w-32 font-bold 2xl:w-24">{item.symbol}</div>
<div className="text-xs text-right text-neutral-400 2xl:w-20">
{item.stockPrice}
</div>
<div className="ml-4 rounded-lg bg-red-700 bg-opacity-90 w-16 text-center">
<div className="text-xs ml-2 rounded-lg bg-red-700 bg-opacity-90 w-20 text-center 2xl:ml-4">
{item.percentChange}%
</div>
</div>