# PDFPreview

## Props
| Name           | Type                 | Default    | Required | Description                                                                                                                                                                                                                                                                                                                                                                           |
| -------------- | -------------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| customControls | Array&lt;*&gt;       |            | true     | Array of objects that will be used to create custom `ControlComponents`<br>that are displayed alongside`prevPageButton` and `nextPageButton`<br> each object of the array must have one prop called `useComponent`<br> `useComponent` will be used to create `ControlComponent` via `React.cloneElement`<br> `ControlComponent` has access to all props within the item of that array |
| data           | Object               |            | true     | object that contains, prop `extUrl` that has the relative path to the<br>pdf to be previewed                                                                                                                                                                                                                                                                                          |
| description    | Function &#124; void | () => null | false    | Function that returns description of previewed pdf under `div.pdf-preview__footer`                                                                                                                                                                                                                                                                                                    |
| prevPageButton | Object               |            | true     | Custom button component passed down which is `React.cloneElement`ed with the<br>the following props:<br>- `disabled: page === 1` (button is `disabled` if `page` is 1),<br>- `onClick: this.handlePrevious` (on click of that button runs handlePrevious<br>    which decrements `page`)                                                                                              |
| nextPageButton | Object               |            | true     | Custom button component passed down which is `React.cloneElement`ed with the<br>the following props:<br>- `disabled: page === pages` (button is `disabled` if you are on the last<br>page of pdf),<br>- `onClick: this.handleNext` (on click of that button runs handlePrevious<br>    which increments `page`)                                                                       |
