Typescript error when using HTMLFlipBook
nguyenduckhanhks opened this issue · 10 comments
Yes I'm facing the same issue. I think all attributes except height and width should be marked optional in TS.
Having the same issue.
Having the same issue x3
Simplest fix for me was to add ts-ignore
import HTMLFlipBook from 'react-pageflip';
const SampleReportFlip = () => {
// @ts-ignore
return (<HTMLFlipBook width={300} height={500}>
<div className="demoPage">Page 1</div>
<div className="demoPage">Page 2</div>
<div className="demoPage">Page 3</div>
<div className="demoPage">Page 4</div>
</HTMLFlipBook>)
}
export default SampleReportFlip;
same issue x4. Will use @ts-ignore
for now, but this isn't desirable for obvious reasons...
How can I use this library using typescript? ..
same issue..
Same issue. Provided all attr manually. +1 for all attributes except height and width should be marked optional in TS.
i fixed it by add like this
<HTMLFlipBook
style={{}}
// children={{}}
startPage={0}
width={300}
height={500}
drawShadow={true}
flippingTime={10}
usePortrait={false}
startZIndex={0}
autoSize={false}
clickEventForward={false}
useMouseEvents={false}
swipeDistance={0}
showPageCorners={false}
disableFlipByClick={false}
size="stretch"
minWidth={315}
maxWidth={1000}
minHeight={400}
maxHeight={1533}
maxShadowOpacity={0.5}
showCover={true}
mobileScrollSupport={true}
onFlip={()=>{}}
onChangeOrientation={()=>{}}
onChangeState={()=>{}}
className="demo-book"
>