refactor. make title in dialog less big

This commit is contained in:
Sinclair Chen 2022-08-19 15:22:28 -07:00
parent 7fdcb78ae8
commit dcd654228a
2 changed files with 6 additions and 8 deletions

View File

@ -534,9 +534,8 @@ export function ContractBetsTable(props: {
contract: Contract contract: Contract
bets: Bet[] bets: Bet[]
isYourBets: boolean isYourBets: boolean
className?: string
}) { }) {
const { contract, className, isYourBets } = props const { contract, isYourBets } = props
const bets = sortBy( const bets = sortBy(
props.bets.filter((b) => !b.isAnte && b.amount !== 0), props.bets.filter((b) => !b.isAnte && b.amount !== 0),
@ -568,7 +567,7 @@ export function ContractBetsTable(props: {
const unfilledBets = useUnfilledBets(contract.id) ?? [] const unfilledBets = useUnfilledBets(contract.id) ?? []
return ( return (
<div className={clsx('overflow-x-auto', className)}> <div className="overflow-x-auto">
{amountRedeemed > 0 && ( {amountRedeemed > 0 && (
<> <>
<div className="pl-2 text-sm text-gray-500"> <div className="pl-2 text-sm text-gray-500">
@ -771,7 +770,7 @@ function SellButton(props: {
setIsSubmitting(false) setIsSubmitting(false)
}} }}
> >
<div className="mb-4 text-2xl"> <div className="mb-4 text-xl">
Sell {formatWithCommas(shares)} shares of{' '} Sell {formatWithCommas(shares)} shares of{' '}
<OutcomeLabel outcome={outcome} contract={contract} truncate="long" />{' '} <OutcomeLabel outcome={outcome} contract={contract} truncate="long" />{' '}
for {formatMoney(saleAmount)}? for {formatMoney(saleAmount)}?

View File

@ -120,7 +120,7 @@ export function ContractCard(props: {
truncate={'long'} truncate={'long'}
/> />
) : ( ) : (
<FreeResponseTopAnswer contract={contract} truncate="long" /> <FreeResponseTopAnswer contract={contract} />
))} ))}
</Col> </Col>
{showQuickBet ? ( {showQuickBet ? (
@ -230,10 +230,9 @@ export function BinaryResolutionOrChance(props: {
function FreeResponseTopAnswer(props: { function FreeResponseTopAnswer(props: {
contract: FreeResponseContract | MultipleChoiceContract contract: FreeResponseContract | MultipleChoiceContract
truncate: 'short' | 'long' | 'none'
className?: string className?: string
}) { }) {
const { contract, truncate } = props const { contract } = props
const topAnswer = getTopAnswer(contract) const topAnswer = getTopAnswer(contract)
@ -241,7 +240,7 @@ function FreeResponseTopAnswer(props: {
<AnswerLabel <AnswerLabel
className="!text-gray-600" className="!text-gray-600"
answer={topAnswer} answer={topAnswer}
truncate={truncate} truncate="long"
/> />
) : null ) : null
} }