a11y-doc-preview
v1.5.2
Published
Accessible document preview component for use in the Kofile ecosystem.
Downloads
11
Readme
A11y-Doc-Preview
A1y-Doc-Preview is an accessible document preview solution written in Typescript for the Kofile ecosystem.
Starting The Dev Server
yarn
yarn preview
- Visit
localhost:1234
Props
| Name | Type | Required | Description |
| :------------------ | :----------- | :------: | :---------------------------------------------- |
| doc | Doc
| ✅ | Object with information about the document. |
| navigation | Navigation
| ✅ | Object with navigation functions. |
| applyCertification | function | ⭕️ | Function to call to apply certification. |
| isSecure | boolean | ✅ | Whether or not to show the document as secured. |
| isMarginalReference | boolean | ✅ | Whether or not to render as marginal reference. |
| disablePan | boolean | ✅ | Whether or not to disable image panning. |
| cart | Cart
| ✅ | Object with cart related functions. |
Doc
| Name | Type | Required | Description |
| :------------------- | :------------------- | :------: | :------------------------------------------ |
| id | number | ✅ | Id of the document. |
| summary | Summary
| ✅ | Object containing the document summary |
| imageUrls | Array | ✅ | Array of image urls |
| attachments | Array<Array> | ✅ | Array of array of attachment urls |
| attachmentThumbnails | Array<Array> | ✅ | Array of array of attachment thumbnail urls |
| thumbnailUrls | Array | ✅ | Array of thumbnail urls |
Navigation
| Name | Type | Required | Description | | :---------------- | :------- | :------: | :--------------------------------------------------------- | | onNext | function | ✅ | Function to call when navigating to next document | | onPrev | function | ✅ | Function to call when navigating to prev document | | onReturnToPrevDoc | function | ✅ | Function to call on navigation for marginal reference mode |