Skip to content

Function: DocViewer()

ts
function DocViewer(props: DocViewerProps): Block;

Defined in: src/renderer/blocks/index.ts:1311

Document viewer component.

Parameters

ParameterType
propsDocViewerProps

Returns

Block

Example

ts
DocViewer({
  title: 'Document viewer',
  description: 'Review the attached documents.',
  items: [
    {
      title: 'invoice.jpg',
      subtitle: '15 KB',
      filetype: 'image',
      src: 'data:image/jpeg;base64,...',
    },
  ],
  buttons: [
    {text: 'Approve', value: 'approve'},
    {text: 'Reject', value: 'reject'},
  ],
  isCollapsible: true,
  collapsed: false,
});

Matterway Assistant SDK Documentation