Just submit, allow xs on pills

This commit is contained in:
Ian Philips 2022-09-07 21:39:14 -06:00
parent 4439447a6d
commit 35de4c485a
4 changed files with 9 additions and 8 deletions

View File

@ -206,7 +206,7 @@ export function AnswerBetPanel(props: {
)} )}
onClick={betDisabled ? undefined : submitBet} onClick={betDisabled ? undefined : submitBet}
> >
{isSubmitting ? 'Submitting...' : 'Submit trade'} {isSubmitting ? 'Submitting...' : 'Submit'}
</button> </button>
) : ( ) : (
<BetSignUpPrompt /> <BetSignUpPrompt />

View File

@ -5,19 +5,19 @@ export function PillButton(props: {
selected: boolean selected: boolean
onSelect: () => void onSelect: () => void
color?: string color?: string
big?: boolean xs?: boolean
children: ReactNode children: ReactNode
}) { }) {
const { children, selected, onSelect, color, big } = props const { children, selected, onSelect, color, xs } = props
return ( return (
<button <button
className={clsx( className={clsx(
'cursor-pointer select-none whitespace-nowrap rounded-full', 'cursor-pointer select-none whitespace-nowrap rounded-full px-3 py-1.5 sm:text-sm',
xs ? 'text-xs' : 'text-sm',
selected selected
? ['text-white', color ?? 'bg-greyscale-6'] ? ['text-white', color ?? 'bg-greyscale-6']
: 'bg-greyscale-2 hover:bg-greyscale-3', : 'bg-greyscale-2 hover:bg-greyscale-3'
big ? 'px-8 py-2' : 'px-3 py-1.5 text-sm'
)} )}
onClick={onSelect} onClick={onSelect}
> >

View File

@ -27,7 +27,8 @@ export function AcceptChallengeButton(props: {
setErrorText('') setErrorText('')
}, [open]) }, [open])
if (!user) return <BetSignUpPrompt label="Accept this bet" className="mt-4" /> if (!user)
return <BetSignUpPrompt label="Sign up to accept" className="mt-4" />
const iAcceptChallenge = () => { const iAcceptChallenge = () => {
setLoading(true) setLoading(true)

View File

@ -203,7 +203,7 @@ function NumericBuyPanel(props: {
)} )}
onClick={betDisabled ? undefined : submitBet} onClick={betDisabled ? undefined : submitBet}
> >
{isSubmitting ? 'Submitting...' : 'Submit bet'} {isSubmitting ? 'Submitting...' : 'Submit'}
</button> </button>
)} )}