From 43b0fe67495bf92fb642f5b7f9571f28e36047c4 Mon Sep 17 00:00:00 2001 From: mantikoros <95266179+mantikoros@users.noreply.github.com> Date: Mon, 6 Jun 2022 09:54:43 -0500 Subject: [PATCH] =?UTF-8?q?Contract=20card=20ui=20tweaks:=20consistent=20m?= =?UTF-8?q?arket=20type=20colors,=20no=20underline,=E2=80=A6=20(#402)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * contract card ui tweaks: consistent market type colors, no underline, adjust font/border size * bigger probabiity numbers in contract card * revert non-color changes; change prob bar width to 1.5 --- web/components/contract/quick-bet.tsx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/web/components/contract/quick-bet.tsx b/web/components/contract/quick-bet.tsx index 1740a6d9..c5633c0a 100644 --- a/web/components/contract/quick-bet.tsx +++ b/web/components/contract/quick-bet.tsx @@ -140,6 +140,8 @@ export function QuickBet(props: { contract: Contract; user: User }) { } } + const textColor = `text-${getColor(contract, previewProb)}` + return ( ) : ( )} @@ -227,14 +229,14 @@ export function ProbBar(props: { contract: Contract; previewProb?: number }) { <>
= 0.5 ? 'primary' : 'red-400' + if ((contract.closeTime ?? Infinity) < Date.now()) { + return 'gray-400' + } + + // TODO: Not sure why eg green-400 doesn't work here; try upgrading Tailwind + return 'primary' }