Files
suwayomi-material-you-webui/webUI/react/src/components/reader/pager/VerticalPager.tsx

44 lines
1.2 KiB
TypeScript
Raw Normal View History

2021-05-15 17:18:57 +04:30
/* eslint-disable @typescript-eslint/no-unused-vars */
/*
* 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';
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%',
},
});
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>
);
}