import {Trans} from '@common/i18n/trans'; import {IconButton} from '@common/ui/buttons/icon-button'; import {KeyboardArrowLeftIcon} from '@common/icons/material/KeyboardArrowLeft'; import {KeyboardArrowRightIcon} from '@common/icons/material/KeyboardArrowRight'; import React from 'react'; import {FontSelectorState} from '@common/ui/font-selector/font-selector-state'; interface FontSelectorPaginationProps { state: FontSelectorState; } export function FontSelectorPagination({ state: {currentPage = 0, setCurrentPage, filteredFonts, pages}, }: FontSelectorPaginationProps) { const total = filteredFonts?.length || 0; return (
{total > 0 && (
)}
{ setCurrentPage(Math.max(0, currentPage - 1)); }} > = pages.length - 1} onClick={() => { setCurrentPage(currentPage + 1); }} >
); }