Skip to content

defineScreen

defineScreen(input): Screen

Defined in: packages/core/src/defineScreen.ts:39

Define a screen with metadata for the screen catalog.

When a mock is defined, navigation targets (navigateTo, itemNavigateTo, rowNavigateTo) are automatically extracted and merged into the next array.

Screen

Screen

export const screen = defineScreen({
id: "billing.invoice.detail",
title: "Invoice Detail",
route: "/billing/invoices/:id",
owner: ["billing"],
tags: ["billing", "invoice"],
dependsOn: ["InvoiceAPI.getDetail"],
entryPoints: ["billing.invoice.list"],
next: ["billing.invoice.edit"],
mock: {
sections: [{
elements: [
{ type: "button", label: "Pay", navigateTo: "billing.payment.start" },
],
}],
},
})
// next will be ["billing.invoice.edit", "billing.payment.start"]