import { FormGroup, Input } from '@vegaprotocol/ui-toolkit'; import { OrderTimeInForce } from '@vegaprotocol/wallet'; import type { TransactionStatus } from './deal-ticket'; import { ExpirySelector } from './expiry-selector'; import { SideSelector } from './side-selector'; import { SubmitButton } from './submit-button'; import { TimeInForceSelector } from './time-in-force-selector'; import { TypeSelector } from './type-selector'; import type { Order } from './use-order-state'; import type { DealTicketQuery_market } from './__generated__/DealTicketQuery'; interface DealTicketLimitProps { order: Order; updateOrder: (order: Partial) => void; transactionStatus: TransactionStatus; market: DealTicketQuery_market; } export const DealTicketLimit = ({ order, updateOrder, transactionStatus, market, }: DealTicketLimitProps) => { return ( <> updateOrder({ type })} /> updateOrder({ side })} />
updateOrder({ size: e.target.value })} className="w-full" type="number" data-testid="order-size" />
@
updateOrder({ price: e.target.value })} className="w-full" type="number" data-testid="order-price" />
updateOrder({ timeInForce })} /> {order.timeInForce === OrderTimeInForce.GTT && ( { if (date) { updateOrder({ expiration: date }); } }} /> )} ); };