gerhardsletten / react-reader

An ePub-reader for React, powered by Epub.js
https://react-reader.metabits.no
Apache License 2.0
676 stars 130 forks source link

ReactReaderStyle is undefined. #144

Closed athenaleong closed 1 year ago

athenaleong commented 1 year ago

I tried implementing custom reader style by following the documentation

const ownStyles = {
  ...ReactReaderStyle,
  arrow: {
    ...ReactReaderStyle.arrow,
    color: 'red'
  }
}

const App = () => {
  return (
    <div style={{ height: '100vh' }} className="myReader">
      <ReactReader
        url="https://react-reader.metabits.no/files/alice.epub"
        readerStyles={ownStyles}
      />
    </div>
  )
}

But it seems like ReactReaderStyle is undefined. Any clue what could be happening?

gerhardsletten commented 1 year ago

@athenaleong Sorry, in trying to fix this for Typescript users, there was a change in the exported name of the styles. It should be fixed in react-reader@1.2.1