Function docViewer

  • Creates a doc viewer component that can be used to display doc contents alongside a sidebar.

    Parameters

    • props: DocViewerProps

      Configuration object for the header bar

    Returns Element

    A JSX element representing the doc viewer component

    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',
    });