|
|
|
@ -51,7 +51,8 @@ const Reader = ({ url, loadingView }: Props) => { |
|
|
|
|
|
|
|
|
|
const [bookStyle, setBookStyle] = useState<BookStyle>({ |
|
|
|
|
fontFamily: "Sans", |
|
|
|
|
fontSize: 18, |
|
|
|
|
color: "red", |
|
|
|
|
fontSize: 14, |
|
|
|
|
lineHeight: 1.4, |
|
|
|
|
marginHorizontal: 15, |
|
|
|
|
marginVertical: 5, |
|
|
|
@ -219,17 +220,17 @@ const Reader = ({ url, loadingView }: Props) => { |
|
|
|
|
// ];
|
|
|
|
|
|
|
|
|
|
const readyColors = [ |
|
|
|
|
{ name: "dark-white", value: "#121212" }, |
|
|
|
|
{ name: "light-white", value: "#fff" }, |
|
|
|
|
{ name: "dark-blue", value: "#5858d3" }, |
|
|
|
|
{ name: "dark-brown", value: "#af622e" }, |
|
|
|
|
{ name: "light-brown", value: "#fff4e1" }, |
|
|
|
|
{ name: "light-blue", value: "#C3DDFF" }, |
|
|
|
|
{ name: "dark-white", bgColor: "#4e4e4e", color: "#fff" }, |
|
|
|
|
{ name: "light-white", bgColor: "#fff", color: "#292929" }, |
|
|
|
|
{ name: "dark-blue", bgColor: "#5858d3", color: "#fff" }, |
|
|
|
|
{ name: "dark-brown", bgColor: "#af622e", color: "#fff4e1" }, |
|
|
|
|
{ name: "light-brown", bgColor: "#fff4e1", color: "#af622e" }, |
|
|
|
|
{ name: "light-blue", bgColor: "#C3DDFF", color: "#5858df" }, |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
const colorHandler = (color: any) => { |
|
|
|
|
let myColor = readyColors.filter((item) => item.name === color); |
|
|
|
|
return myColor[0].value; |
|
|
|
|
return myColor[0].bgColor; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
@ -256,6 +257,7 @@ const Reader = ({ url, loadingView }: Props) => { |
|
|
|
|
<nav |
|
|
|
|
style={{ |
|
|
|
|
backgroundColor: colorHandler(color), |
|
|
|
|
color: "green", |
|
|
|
|
display: "flex", |
|
|
|
|
justifyContent: "center", |
|
|
|
|
paddingTop: "1rem", |
|
|
|
@ -293,7 +295,7 @@ const Reader = ({ url, loadingView }: Props) => { |
|
|
|
|
</> |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
<nav style={{ overflow: "hidden" }}> |
|
|
|
|
<nav className="nav-book"> |
|
|
|
|
<ReactEpubViewer |
|
|
|
|
url={url} |
|
|
|
|
viewerLayout={viewerLayout} |
|
|
|
|