Tally UI

RefundModal

A dialog hosting RefundForm with controlled open state

Hosts RefundForm in a dialog with the same props except onCancel, plus open and onOpenChange. The form's initial Cancel button calls onOpenChange(false) to request closing the dialog. Cancel within the confirmation step returns to the form.

Usage

import { RefundModal } from '@tallyui/components';

<RefundModal
  open={open}
  onOpenChange={setOpen}
  lines={[{ id: 'line-1', name: 'Mug', quantity: 1, totalMinor: 500, taxMinor: 100 }]}
  refunds={[]}
  currency="EUR"
  orderReference="1042"
  orderTotalMinor={600}
  onConfirm={handleConfirm}
/>

Props

PropTypeDefaultDescription
openboolean---Required controlled dialog open state
onOpenChange(open: boolean) => void---Required callback for changes to the dialog's open state
Other form propsOmit<RefundFormProps, 'onCancel'>See RefundFormAll other RefundFormProps; the modal supplies onCancel

On this page