react-book-reader 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -1
- package/lib/react-book-reader.es.js +475 -474
- package/lib/react-book-reader.umd.js +7 -7
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -38,8 +38,29 @@ import { ReactReader } from 'react-book-reader'
|
|
|
38
38
|
export default () => (
|
|
39
39
|
<div style={{ height: '100vh' }}>
|
|
40
40
|
{/* Supports EPUB, MOBI, KF8 (AZW3), FB2, CBZ, PDF */}
|
|
41
|
-
<ReactReader url="files/啼笑因缘.epub" />
|
|
41
|
+
<ReactReader url="/files/啼笑因缘.epub" />
|
|
42
42
|
</div>
|
|
43
43
|
);
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
## ReactReader Attributes
|
|
47
|
+
|
|
48
|
+
| **Name** | **Description** | **Type** | **Default** |
|
|
49
|
+
| -------- | --------------------------------- | ---------------------- | ----------- |
|
|
50
|
+
| url | book url or File | `string`/`File` | — |
|
|
51
|
+
| location | set / update location of the book | `string`/`number` | — |
|
|
52
|
+
| title | the title of the book | `string` | — |
|
|
53
|
+
| showToc | whether to show the toc | `boolean` | true |
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## ReactReader props passed to inner BookView
|
|
57
|
+
|
|
58
|
+
| **Name** | **Description** | **Type** | |
|
|
59
|
+
| ----------- | ---------------------------------------------------------------------------- | ---------------- |
|
|
60
|
+
| url | book url or File | `string`/`File` | |
|
|
61
|
+
| tocChanged | when the reader has parsed the book you will receive an array of the chapters | `function(toc)` |
|
|
62
|
+
| nextPage | display next page | `function` |
|
|
63
|
+
| prevPage | display previous page | `function` |
|
|
64
|
+
| setLocation | Set the page | `function(href)` |
|
|
65
|
+
| LoadingView | if you want to customize the LoadingView | `element` |
|
|
66
|
+
| ErrorView | if you want to customize the ErrorView | `element` |
|