import clsx from 'clsx' import React, { ReactNode } from 'react' import { formatMoney } from 'common/util/format' import { Col } from './layout/col' import { Row } from './layout/row' import { resolution } from 'common/contract' export function YesNoCancelSelector(props: { selected: resolution | undefined onSelect: (selected: resolution) => void className?: string btnClassName?: string }) { const { selected, onSelect } = props const btnClassName = clsx('px-6 flex-1 rounded-3xl', props.btnClassName) return ( {/* Should ideally use a radio group instead of buttons */} ) } export function ChooseCancelSelector(props: { selected: 'CHOOSE' | 'CHOOSE_MULTIPLE' | 'CANCEL' | undefined onSelect: (selected: 'CHOOSE' | 'CHOOSE_MULTIPLE' | 'CANCEL') => void className?: string btnClassName?: string }) { const { selected, onSelect, className } = props const btnClassName = clsx('px-6 flex-1', props.btnClassName) return ( ) } const fundAmounts = [1000, 2500, 10000] export function FundsSelector(props: { selected: 1000 | 2500 | 10000 onSelect: (selected: 1000 | 2500 | 10000) => void className?: string btnClassName?: string }) { const { selected, onSelect, className } = props const btnClassName = clsx('!px-2 whitespace-nowrap', props.btnClassName) return ( {fundAmounts.map((amount) => ( ))} ) } export function BuyButton(props: { className?: string; onClick?: () => void }) { const { className, onClick } = props // Note: styles coppied from YesNoSelector return ( ) } export function NumberCancelSelector(props: { selected: 'NUMBER' | 'CANCEL' | undefined onSelect: (selected: 'NUMBER' | 'CANCEL') => void className?: string btnClassName?: string }) { const { selected, onSelect, className } = props const btnClassName = clsx('px-6 flex-1', props.btnClassName) return ( ) } function Button(props: { className?: string onClick?: () => void color: 'green' | 'red' | 'blue' | 'indigo' | 'yellow' | 'gray' children?: ReactNode }) { const { className, onClick, children, color } = props return ( ) }