mirror of
https://github.com/dylanbenzi/yellowbird.git
synced 2026-11-27 01:07:01 +00:00
prettier config and tailwindcss
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"tabWidth": 2,
|
||||
"useTabs": true,
|
||||
"plugins": ["prettier-plugin-tailwindcss"]
|
||||
}
|
||||
@@ -9,13 +9,13 @@ interface HomepageModuleProps {
|
||||
|
||||
const HomepageModule = ({ title, children }: HomepageModuleProps) => {
|
||||
return (
|
||||
<div className="flex flex-col h-80 bg-card rounded-lg 2xl:h-full">
|
||||
<div className="flex h-80 flex-col rounded-lg bg-card 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">
|
||||
<div className="flex items-center px-2 text-lg font-semibold">
|
||||
{title}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-grow w-full overflow-hidden mt-2 border-t border-neutral-700">
|
||||
<div className="mt-2 w-full flex-grow overflow-hidden border-t border-neutral-700">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -107,38 +107,38 @@ export const MoversModule = () => {
|
||||
return (
|
||||
<HomepageModule title="Movers">
|
||||
<div className="flex justify-between 2xl:px-2">
|
||||
<div className="px-4 mt-4 2xl:mt-6">
|
||||
<div className="mt-4 px-4 2xl:mt-6">
|
||||
<div className="text-lg">Gainers</div>
|
||||
<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">
|
||||
<div className="mt-4 grid grid-cols-2 grid-rows-5 gap-x-2 gap-y-4 2xl:gap-x-10 2xl:gap-y-6">
|
||||
{winnerMovers.map((item) => (
|
||||
<div
|
||||
className="flex border-b border-neutral-400 pb-1 text-sm 2xl:text-base"
|
||||
key={item.symbol}
|
||||
>
|
||||
<div className="w-32 font-bold 2xl:w-24">{item.symbol}</div>
|
||||
<div className="text-xs text-right text-neutral-400 2xl:w-20 2xl:text-base">
|
||||
<div className="text-right text-xs text-neutral-400 2xl:w-20 2xl:text-base">
|
||||
{item.stockPrice}
|
||||
</div>
|
||||
<div className="text-xs ml-2 rounded-lg bg-green-500 bg-opacity-90 w-20 text-center 2xl:ml-4 2xl:text-base">
|
||||
<div className="ml-2 w-20 rounded-lg bg-green-500 bg-opacity-90 text-center text-xs 2xl:ml-4 2xl:text-base">
|
||||
+{item.percentChange}%
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="px-4 mt-4 2xl:mt-6">
|
||||
<div className="mt-4 px-4 2xl:mt-6">
|
||||
<div className="text-lg">Losers</div>
|
||||
<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">
|
||||
<div className="mt-4 grid grid-cols-2 grid-rows-5 gap-x-2 gap-y-4 2xl:gap-x-10 2xl:gap-y-6">
|
||||
{loserMovers.map((item) => (
|
||||
<div
|
||||
className="flex border-b border-neutral-400 pb-1 text-sm 2xl:text-base"
|
||||
key={item.symbol}
|
||||
>
|
||||
<div className="w-32 font-bold 2xl:w-24">{item.symbol}</div>
|
||||
<div className="text-xs text-right text-neutral-400 2xl:w-20 2xl:text-base">
|
||||
<div className="text-right text-xs text-neutral-400 2xl:w-20 2xl:text-base">
|
||||
{item.stockPrice}
|
||||
</div>
|
||||
<div className="text-xs ml-2 rounded-lg bg-red-500 bg-opacity-90 w-20 text-center 2xl:ml-4 2xl:text-base">
|
||||
<div className="ml-2 w-20 rounded-lg bg-red-500 bg-opacity-90 text-center text-xs 2xl:ml-4 2xl:text-base">
|
||||
{item.percentChange}%
|
||||
</div>
|
||||
</div>
|
||||
@@ -177,18 +177,18 @@ export const MarketsModule = () => {
|
||||
return (
|
||||
<HomepageModule title="Markets">
|
||||
<div className="flex h-full items-center py-2 2xl:py-4">
|
||||
<div className="flex flex-col grow max-w-[40%] justify-between h-full px-2">
|
||||
<div className="flex h-full max-w-[40%] grow flex-col justify-between px-2">
|
||||
{markets.map((marketItem) => (
|
||||
<div
|
||||
key={marketItem.symbol}
|
||||
className="rounded-md hover:bg-neutral-700 hover:cursor-pointer"
|
||||
className="rounded-md hover:cursor-pointer hover:bg-neutral-700"
|
||||
>
|
||||
<div className="flex items-center pl-2 py-1 justify-between border-b border-neutral-700">
|
||||
<div className="flex items-center justify-between border-b border-neutral-700 py-1 pl-2">
|
||||
<div className="text-sm font-semibold 2xl:text-base">
|
||||
{marketItem.symbol}
|
||||
</div>
|
||||
<div className="flex justify-between space-x-4 text-sm pr-2">
|
||||
<div className="text-sm w-12 text-right">
|
||||
<div className="flex justify-between space-x-4 pr-2 text-sm">
|
||||
<div className="w-12 text-right text-sm">
|
||||
{getLastPrice(marketItem.chart)}
|
||||
</div>
|
||||
<div
|
||||
@@ -196,7 +196,7 @@ export const MarketsModule = () => {
|
||||
getPriceDifference(marketItem.chart, 1) > 0
|
||||
? "text-green-500"
|
||||
: "text-red-500",
|
||||
"text-sm w-10 text-right 2xl:w-12"
|
||||
"w-10 text-right text-sm 2xl:w-12",
|
||||
)}
|
||||
>
|
||||
{getPriceDifference(marketItem.chart, 1)}
|
||||
@@ -215,7 +215,7 @@ export const MarketsModule = () => {
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="h-full grow max-w-[60%] relative">
|
||||
<div className="relative h-full max-w-[60%] grow">
|
||||
<div className="absolute ml-4 mt-1">S&P 500</div>
|
||||
<Chart
|
||||
series={[sp500IndexLine, sma5Line]}
|
||||
|
||||
@@ -20,7 +20,7 @@ export const PriceModule = () => {
|
||||
|
||||
return (
|
||||
<HomepageModule title="Price Chart">
|
||||
<div className="h-full relative">
|
||||
<div className="relative h-full">
|
||||
<Chart
|
||||
series={[symbolLine]}
|
||||
colors={{}}
|
||||
@@ -45,8 +45,8 @@ export const PriceModule = () => {
|
||||
export const DescriptionModule = () => {
|
||||
return (
|
||||
<HomepageModule title="Company Description">
|
||||
<div className="space-y-2 2xl:space-y-4 px-4 2xl:px-6">
|
||||
<div className="flex justify-between items-center pt-4">
|
||||
<div className="space-y-2 px-4 2xl:space-y-4 2xl:px-6">
|
||||
<div className="flex items-center justify-between pt-4">
|
||||
<div className="text-lg 2xl:text-2xl">Apple Inc</div>
|
||||
<Image
|
||||
alt="apple"
|
||||
@@ -55,7 +55,7 @@ export const DescriptionModule = () => {
|
||||
height={20}
|
||||
/>
|
||||
</div>
|
||||
<div className="text-sm 2xl:text-base font-light text-justify">
|
||||
<div className="text-justify text-sm font-light 2xl:text-base">
|
||||
Apple Inc (Apple) designs, manufactures, and markets smartphones,
|
||||
tablets, personal computers, and wearable devices. The company offers
|
||||
software applications and related services, accessories, and
|
||||
@@ -68,28 +68,28 @@ export const DescriptionModule = () => {
|
||||
Arcade, Apple News+, Apple Fitness+, Apple Card, Apple TV+, and Apple
|
||||
Music.
|
||||
</div>
|
||||
<div className="grid gap-x-2 gap-y-1 grid-cols-2 grid-rows-3 font-light 2xl:gap-x-6 2xl:gap-y-2">
|
||||
<div className="border-b border-neutral-700 flex justify-between text-xs 2xl:font-base">
|
||||
<div className="grid grid-cols-2 grid-rows-3 gap-x-2 gap-y-1 font-light 2xl:gap-x-6 2xl:gap-y-2">
|
||||
<div className="2xl:font-base flex justify-between border-b border-neutral-700 text-xs">
|
||||
<div>Sector</div>
|
||||
<div>Technology</div>
|
||||
</div>
|
||||
<div className="border-b border-neutral-700 flex justify-between text-xs 2xl:font-base">
|
||||
<div className="2xl:font-base flex justify-between border-b border-neutral-700 text-xs">
|
||||
<div>Website</div>
|
||||
<div>https://apple.com</div>
|
||||
</div>
|
||||
<div className="border-b border-neutral-700 flex justify-between text-xs 2xl:font-base">
|
||||
<div className="2xl:font-base flex justify-between border-b border-neutral-700 text-xs">
|
||||
<div>Industry</div>
|
||||
<div>Consumer Electronics</div>
|
||||
</div>
|
||||
<div className="border-b border-neutral-700 flex justify-between text-xs 2xl:font-base">
|
||||
<div className="2xl:font-base flex justify-between border-b border-neutral-700 text-xs">
|
||||
<div>Address</div>
|
||||
<div>One Apple Park Way, Cupertino, California, 95014</div>
|
||||
</div>
|
||||
<div className="border-b border-neutral-700 flex justify-between text-xs 2xl:font-base">
|
||||
<div className="2xl:font-base flex justify-between border-b border-neutral-700 text-xs">
|
||||
<div>CEO</div>
|
||||
<div>Tim Cook</div>
|
||||
</div>
|
||||
<div className="border-b border-neutral-700 flex justify-between text-xs 2xl:font-base">
|
||||
<div className="2xl:font-base flex justify-between border-b border-neutral-700 text-xs">
|
||||
<div>Employees</div>
|
||||
<div>161,000</div>
|
||||
</div>
|
||||
@@ -179,7 +179,7 @@ export const KPIModule = () => {
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
<div className="grid grid-cols-4 grid-rows-4 gap-x-6 gap-y-3 p-4 pt-3 font-light text-xs">
|
||||
<div className="grid grid-cols-4 grid-rows-4 gap-x-6 gap-y-3 p-4 pt-3 text-xs font-light">
|
||||
<div className="flex justify-between border-b border-neutral-700">
|
||||
<div>Previous Close</div>
|
||||
<div>171.37</div>
|
||||
|
||||
Reference in New Issue
Block a user