Fix bet modal probability sticking (#793)
* Fix button group styles * Reset prob strike-out when bet modal closed
This commit is contained in:
		
							parent
							
								
									6929d643e1
								
							
						
					
					
						commit
						5904038890
					
				|  | @ -22,7 +22,7 @@ import { formatMoney } from 'common/util/format' | ||||||
| export function BetInline(props: { | export function BetInline(props: { | ||||||
|   contract: CPMMBinaryContract | PseudoNumericContract |   contract: CPMMBinaryContract | PseudoNumericContract | ||||||
|   className?: string |   className?: string | ||||||
|   setProbAfter: (probAfter: number) => void |   setProbAfter: (probAfter: number | undefined) => void | ||||||
|   onClose: () => void |   onClose: () => void | ||||||
| }) { | }) { | ||||||
|   const { contract, className, setProbAfter, onClose } = props |   const { contract, className, setProbAfter, onClose } = props | ||||||
|  | @ -82,7 +82,7 @@ export function BetInline(props: { | ||||||
|         <div className="text-xl">Bet</div> |         <div className="text-xl">Bet</div> | ||||||
|         <YesNoSelector |         <YesNoSelector | ||||||
|           className="space-x-0" |           className="space-x-0" | ||||||
|           btnClassName="rounded-none first:rounded-l-2xl last:rounded-r-2xl" |           btnClassName="rounded-l-none rounded-r-none first:rounded-l-2xl last:rounded-r-2xl" | ||||||
|           selected={outcome} |           selected={outcome} | ||||||
|           onSelect={setOutcome} |           onSelect={setOutcome} | ||||||
|           isPseudoNumeric={isPseudoNumeric} |           isPseudoNumeric={isPseudoNumeric} | ||||||
|  | @ -113,7 +113,12 @@ export function BetInline(props: { | ||||||
|           </Button> |           </Button> | ||||||
|         )} |         )} | ||||||
|         <SignUpPrompt size="xs" /> |         <SignUpPrompt size="xs" /> | ||||||
|         <button onClick={onClose}> |         <button | ||||||
|  |           onClick={() => { | ||||||
|  |             setProbAfter(undefined) | ||||||
|  |             onClose() | ||||||
|  |           }} | ||||||
|  |         > | ||||||
|           <XIcon className="ml-1 h-6 w-6" /> |           <XIcon className="ml-1 h-6 w-6" /> | ||||||
|         </button> |         </button> | ||||||
|       </Row> |       </Row> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user