added buy button

This commit is contained in:
ingawei 2022-10-04 15:25:44 -07:00
parent 318e76a9c4
commit 94487f0a04
2 changed files with 16 additions and 4 deletions

View File

@ -210,12 +210,11 @@ function OpenAnswer(props: {
className={clsx( className={clsx(
'bg-greyscale-1 relative w-full rounded-lg transition-all', 'bg-greyscale-1 relative w-full rounded-lg transition-all',
tradingAllowed(contract) tradingAllowed(contract)
? 'text-greyscale-7 drop-shadow-sm hover:drop-shadow-md' ? 'text-greyscale-7'
: 'text-greyscale-5 pointer-events-none' : 'text-greyscale-5 pointer-events-none'
)} )}
onClick={() => setOpen(true)}
> >
<Row className="z-20 -mb-1 justify-between py-2 px-3"> <Row className="z-20 -mb-1 justify-between gap-2 py-2 px-3">
<div> <div>
<span> <span>
<Avatar <Avatar
@ -229,7 +228,17 @@ function OpenAnswer(props: {
text={text} text={text}
/> />
</div> </div>
<Row className="gap-2">
<div className="my-auto text-xl">{probPercent}</div> <div className="my-auto text-xl">{probPercent}</div>
<Button
size="2xs"
color="gray-outline"
onClick={() => setOpen(true)}
className="my-auto"
>
BUY
</Button>
</Row>
</Row> </Row>
<hr <hr
color={color} color={color}

View File

@ -10,6 +10,7 @@ export type ColorType =
| 'indigo' | 'indigo'
| 'yellow' | 'yellow'
| 'gray' | 'gray'
| 'gray-outline'
| 'gradient' | 'gradient'
| 'gray-white' | 'gray-white'
| 'highlight-blue' | 'highlight-blue'
@ -63,6 +64,8 @@ export function Button(props: {
'disabled:bg-greyscale-2 bg-indigo-500 text-white hover:bg-indigo-600', 'disabled:bg-greyscale-2 bg-indigo-500 text-white hover:bg-indigo-600',
color === 'gray' && color === 'gray' &&
'bg-greyscale-1 text-greyscale-6 hover:bg-greyscale-2 disabled:opacity-50', 'bg-greyscale-1 text-greyscale-6 hover:bg-greyscale-2 disabled:opacity-50',
color === 'gray-outline' &&
'border-greyscale-4 text-greyscale-4 hover:bg-greyscale-4 border-2 hover:text-white disabled:opacity-50',
color === 'gradient' && color === 'gradient' &&
'disabled:bg-greyscale-2 border-none bg-gradient-to-r from-indigo-500 to-blue-500 text-white hover:from-indigo-700 hover:to-blue-700', 'disabled:bg-greyscale-2 border-none bg-gradient-to-r from-indigo-500 to-blue-500 text-white hover:from-indigo-700 hover:to-blue-700',
color === 'gray-white' && color === 'gray-white' &&