react-magazine 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +13 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -88,10 +88,19 @@ function App() {
88
88
  return (
89
89
  <div>
90
90
  <MagazineBook ref={bookRef} width={400} height={500} {...handlers}>
91
- <Page number={1}>Page 1</Page>
92
- <Page number={2}>Page 2</Page>
93
- <Page number={3}>Page 3</Page>
94
- <Page number={4}>Page 4</Page>
91
+ {images.map((img, index) => (
92
+ <Page key={index} number={index + 1}>
93
+ <img
94
+ src={img}
95
+ alt={`Page ${index + 1}`}
96
+ style={{
97
+ width: "100%",
98
+ height: "100%",
99
+ objectFit: "cover",
100
+ }}
101
+ />
102
+ </Page>
103
+ ))}
95
104
  </MagazineBook>
96
105
  <button onClick={() => flipPrev()}>Previous</button>
97
106
  <span>Page {state.currentPage + 1} of {state.pageCount}</span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-magazine",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A lightweight React component for realistic page-flip animations, featuring built-in navigation controls, full TypeScript support, and easy style customization.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",