Configuration object
Array of items to display in the doc viewer
React node to be displayed as the sidebar
Optional array of button list items to display in the navigation bar
Optional boolean to control the initial collapsed state of the sidebar
Optional description text to display in the header
Optional boolean to control whether the sidebar can be collapsed
Optional title text to display in the header
Basic usage with buttons and items:
docViewer({
buttons: [
{ text: 'Action 1', value: 'action1' },
{ text: 'Action 2', value: 'action2' },
],
collapsed: false,
description: 'This is a doc viewer',
items: [
{
title: 'example.jpg',
subtitle: '15 KB',
filetype: 'image',
src: 'data:image/jpeg;base64,...',
},
],
isCollapsible: true,
sidebar: <div>Sidebar content</div>,
title: 'Document Viewer',
});
Doc viewer component for displaying doc contents alongside a sidebar.