From 1063897c7c4512d6b4084815ddef22ca735742e0 Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Wed, 11 May 2022 14:35:50 -0700 Subject: [PATCH] Clean up extra wrapper and CSS on BetRow (#178) --- web/components/bet-panel.tsx | 1 + web/components/bet-row.tsx | 64 +++++++++---------- web/components/contract/contract-overview.tsx | 4 +- web/components/yes-no-selector.tsx | 2 +- 4 files changed, 33 insertions(+), 38 deletions(-) diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 679af415..8fba3bf7 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -303,6 +303,7 @@ function BuyPanel(props: { <> onBetChoice(choice)} /> diff --git a/web/components/bet-row.tsx b/web/components/bet-row.tsx index b53a57fd..29493473 100644 --- a/web/components/bet-row.tsx +++ b/web/components/bet-row.tsx @@ -15,9 +15,9 @@ import { useSaveShares } from './use-save-shares' export default function BetRow(props: { contract: FullContract className?: string - labelClassName?: string + btnClassName?: string }) { - const { className, labelClassName, contract } = props + const { className, btnClassName, contract } = props const [open, setOpen] = useState(false) const [betChoice, setBetChoice] = useState<'YES' | 'NO' | undefined>( undefined @@ -31,38 +31,34 @@ export default function BetRow(props: { return ( <> - - {/*
- Place a trade -
*/} - { - setOpen(true) - setBetChoice(choice) - }} - replaceNoButton={ - yesFloorShares > 0 ? ( - - ) : undefined - } - replaceYesButton={ - noFloorShares > 0 ? ( - - ) : undefined - } - /> -
+ { + setOpen(true) + setBetChoice(choice) + }} + replaceNoButton={ + yesFloorShares > 0 ? ( + + ) : undefined + } + replaceYesButton={ + noFloorShares > 0 ? ( + + ) : undefined + } + /> - {tradingAllowed(contract) && ( - - )} + {tradingAllowed(contract) && } ) : ( outcomeType === 'FREE_RESPONSE' && diff --git a/web/components/yes-no-selector.tsx b/web/components/yes-no-selector.tsx index 7c175695..faa8296e 100644 --- a/web/components/yes-no-selector.tsx +++ b/web/components/yes-no-selector.tsx @@ -22,7 +22,7 @@ export function YesNoSelector(props: { } = props const commonClassNames = - 'inline-flex flex-1 items-center justify-center rounded-3xl border-2 p-2' + 'inline-flex items-center justify-center rounded-3xl border-2 p-2' return (