Add background to bet panel

This commit is contained in:
jahooma 2021-12-10 01:01:39 -06:00
parent 7309096854
commit 8ccea8dca0
3 changed files with 5 additions and 7 deletions

View File

@ -5,16 +5,14 @@ import { Col } from './layout/col'
import { Spacer } from './layout/spacer'
import { YesNoSelector } from './yes-no-selector'
export function BetPanel(props: { contract: Contract }) {
const { contract } = props
export function BetPanel(props: { contract: Contract; className?: string }) {
const { contract, className } = props
const [betChoice, setBetChoice] = useState<'yes' | 'no'>('yes')
const [shares, setShares] = useState(0)
return (
<Col>
<Spacer h={12} />
<Col className={'bg-gray-600 p-6 rounded ' + className}>
<div className="p-2 font-medium">Pick outcome</div>
<YesNoSelector
className="p-2"

View File

@ -17,7 +17,7 @@ export function Button(props: {
'bg-green-500 hover:bg-green-600 focus:ring-green-500',
color === 'red' && 'bg-red-500 hover:bg-red-600 focus:ring-red-500',
color === 'deemphasized' &&
'bg-transparent hover:bg-gray-600 focus:ring-gray-400',
'bg-transparent hover:bg-gray-500 focus:ring-gray-400',
className
)}
onClick={onClick}

View File

@ -28,7 +28,7 @@ export default function ContractPage() {
<Row className="justify-between">
<ContractOverview contract={contract} />
<BetPanel contract={contract} />
<BetPanel className="self-start" contract={contract} />
</Row>
</div>
</div>