Components
Kind: element (inline) · Session key: invoicePdfPreview · React: <FinBazeInvoicePdfPreview />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { invoicePdfPreview: { enabled: true } }
}) { clientSecret }
}
Requirements#
The company must have these features effective: sales_invoices. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.
Component features#
None.
Options#
Passed to instance.create("invoice-pdf-preview", options) or as props.
| Option | Type | |
|---|---|---|
invoiceId | string | The sales invoice to preview. |
Every component also takes appearance and navigation ("internal" or "external").
Events#
| Event | React prop |
|---|---|
ready | onReady |
navigate | onNavigate |
error | onError |
Use it#
import { FinBazeInvoicePdfPreview } from "@finbaze/embed-react";
<FinBazeInvoicePdfPreview />
const component = instance.create("invoice-pdf-preview");
component.mount("#finbaze");