2021-05-15 17:18:57 +04:30
|
|
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
2021-05-17 01:38:59 +04:30
|
|
|
/*
|
|
|
|
|
* Copyright (C) Contributors to the Suwayomi project
|
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
2021-05-15 17:18:57 +04:30
|
|
|
import { makeStyles } from '@material-ui/core/styles';
|
|
|
|
|
import React from 'react';
|
2021-05-17 01:38:59 +04:30
|
|
|
import Page from '../Page';
|
2021-05-15 17:18:57 +04:30
|
|
|
|
|
|
|
|
const useStyles = makeStyles({
|
|
|
|
|
reader: {
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
margin: '0 auto',
|
|
|
|
|
width: '100%',
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
2021-05-17 01:38:59 +04:30
|
|
|
export default function VerticalPager(props: IReaderProps) {
|
2021-05-15 17:18:57 +04:30
|
|
|
const { pages, settings, setCurPage } = props;
|
|
|
|
|
|
|
|
|
|
const classes = useStyles();
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className={classes.reader}>
|
|
|
|
|
{
|
|
|
|
|
pages.map((page) => (
|
|
|
|
|
<Page
|
|
|
|
|
key={page.index}
|
|
|
|
|
index={page.index}
|
|
|
|
|
src={page.src}
|
|
|
|
|
setCurPage={setCurPage}
|
|
|
|
|
settings={settings}
|
|
|
|
|
/>
|
|
|
|
|
))
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|