Merge manga action menus (#527)

This commit is contained in:
schroda
2023-12-30 14:26:50 +01:00
committed by GitHub
parent a3a52064cc
commit ecea80f41e
8 changed files with 225 additions and 249 deletions

View File

@@ -25,8 +25,8 @@ import { TManga } from '@/typings.ts';
import { SelectableCollectionSelectMode } from '@/components/collection/SelectableCollectionSelectMode.tsx';
import { useGetVisibleLibraryMangas } from '@/components/library/useGetVisibleLibraryMangas.ts';
import { SelectionFAB } from '@/components/manga/SelectionFAB.tsx';
import { MangasSelectionFABActionItems } from '@/components/manga/MangasSelectionFABActionItems.tsx';
import { PARTIAL_MANGA_FIELDS } from '@/lib/graphql/Fragments.ts';
import { MangaActionMenuItems } from '@/components/manga/MangaActionMenuItems.tsx';
const StyledGridWrapper = styled(Box)(({ theme }) => ({
// TabsMenu height + TabsMenu bottom padding - grid item top padding
@@ -264,13 +264,14 @@ export function Library() {
</StyledGridWrapper>
{isSelectModeActive && (
<SelectionFAB selectedItemsCount={selectedItemIds.length} title="manga.title">
{(handleClose) => (
<MangasSelectionFABActionItems
{(handleClose, setHideMenu) => (
<MangaActionMenuItems
selectedMangas={selectedMangas}
handleClose={(selectionModeState) => {
onClose={(selectionModeState) => {
handleClose();
setIsSelectModeActive(selectionModeState);
}}
setHideMenu={setHideMenu}
/>
)}
</SelectionFAB>