When you generate a dashboard modal extension, the CLI adds the following files to your project:
<your-modal-name>.extension.ts: Builds the modal.<your-modal-name>.tsx: Defines the modal content.<your-modal-name>.config.ts: Contains configurable modal properties.The <your-modal-name>.extension.ts file contains the dashboard modal builder configuration.
The modal builder is defined using the following schema, shown here as a TypeScript type:
| Field | Type | Description |
|---|---|---|
id | string | The modal ID (GUID) is automatically generated and shouldn't be changed. The ID is used to register the modal in the project dashboard. The ID must be unique across all pages in the project. |
title | string | The modal title. The title is used to refer to the modal in the project dashboard. |
width | number | Initial width of the modal while loading. |
height | number | Initial height of the modal while loading. |
component | string | Path of the modal content. |
Here's an example builder definition:
The <your-modal-name>.tsx file contains the dashboard modal content.
The content is defined as a React component that renders when the modal is active.
Inside a dashboard modal component you may choose to use:
The <your-modal-name>.config.ts file contains the configurable properties for the dashboard modal.
Here is an example of the configuration: