2024-10-03 04:02:59 +02:00
|
|
|
/*
|
|
|
|
|
* 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/.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import { ComponentProps } from 'react';
|
|
|
|
|
import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft';
|
|
|
|
|
import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
|
2025-08-16 02:48:46 +02:00
|
|
|
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
|
|
|
|
import { CustomButtonIcon } from '@/base/components/buttons/CustomButtonIcon.tsx';
|
2024-10-03 04:02:59 +02:00
|
|
|
|
|
|
|
|
export const ReaderNavBarDesktopNextPreviousButton = ({
|
|
|
|
|
title,
|
|
|
|
|
type,
|
2025-02-01 14:24:38 +01:00
|
|
|
disabled,
|
2024-10-03 04:02:59 +02:00
|
|
|
...customIconButtonProps
|
2025-02-08 16:16:32 +01:00
|
|
|
}: Omit<ComponentProps<typeof CustomButtonIcon>, 'children'> & {
|
2024-10-03 04:02:59 +02:00
|
|
|
title: string;
|
|
|
|
|
type: 'previous' | 'next';
|
|
|
|
|
}) => (
|
2025-02-01 14:24:38 +01:00
|
|
|
<CustomTooltip title={title} disabled={disabled}>
|
2025-02-08 16:16:32 +01:00
|
|
|
<CustomButtonIcon sx={{ flexBasis: '15%' }} variant="contained" disabled={disabled} {...customIconButtonProps}>
|
2024-10-03 04:02:59 +02:00
|
|
|
{type === 'previous' ? <KeyboardArrowLeftIcon /> : <KeyboardArrowRightIcon />}
|
2025-02-08 16:16:32 +01:00
|
|
|
</CustomButtonIcon>
|
2025-02-01 14:24:38 +01:00
|
|
|
</CustomTooltip>
|
2024-10-03 04:02:59 +02:00
|
|
|
);
|