API reference: @salmonui/pdf-viewer
PdfViewerToolbarCustomIteminterface
import type { PdfViewerToolbarCustomItem } from '@salmonui/pdf-viewer';interface PdfViewerToolbarCustomItem {
readonly id: string;
readonly label: string;
readonly icon?: ReactNode;
readonly disabled?: boolean | undefined;
readonly onSelect?: ((actions: PdfViewerActions) => void) | undefined;
readonly render?: ((actions: PdfViewerActions) => ReactNode) | undefined;
}
A custom toolbar button, or any content through render.
| Name | Signature | Description |
|---|---|---|
id | readonly id: string; | |
label | readonly label: string; | Accessible name, tooltip and overflow menu text. |
iconoptional | readonly icon?: ReactNode; | |
disabledoptional | readonly disabled?: boolean | undefined; | |
onSelectoptional | readonly onSelect?: ((actions: PdfViewerActions) => void) | undefined; | |
renderoptional | readonly render?: ((actions: PdfViewerActions) => ReactNode) | undefined; | Replaces the button. |