Credit note parts
Pieces shared by the credit note screens: the credit note status badge, the signed credit amount (shown as money off once issued) and the credited invoice's status badge.
Component: A piece you place inside your own screens: a table, a form, a card or a dialog. You decide the layout around it. Pages vs components
Works with Dolfin’s SDK context, with appearance and behaviour you can customise. Requires DolfinProvider.
Installation
Needs the Dolfin registry token. The CLI copies the source into your app.
bunx --bun shadcn@4.23.0 add @dolfin/ar-credit-note-partsAlso installs: base-status-badge, base-money, base-theme, ui-ar-credit-note-parts.
Usage
import { CreditNoteAmount } from "@/components/dolfin/ar/credit-note-parts";
// Place it anywhere inside your <DolfinProvider>.
<CreditNoteAmount note={note} />Renders inside DolfinProvider (set it up once). It renders the data you pass as props.
API reference
| Prop | Type | Description |
|---|---|---|
note required | Pick<{ id?: string; organisationId?: string; invoiceId?: string; documentNumber?: null | string; amount?: number | string; netAmount?: numbe… | |
className | string |
Customisation
Without editing the source, you can change:
- Class names
className- Messages
ar.creditNotes.statusar.invoice.states
Or edit the installed file directly: it is your code. See theming for colours and fonts.
Hooks
The SDK hooks this component uses. Use them directly from @dolfinai/react to build your own version.
useMessagesFiles
Written to your app by the install command:
components/dolfin/ar/credit-note-parts.tsx79 lines