BottomSheet: backward animation
This commit is contained in:
parent
0d856c61c7
commit
c461ae72f8
9 changed files with 150 additions and 75 deletions
|
@ -2,9 +2,7 @@ import type { mastodon } from "masto";
|
|||
import { type Component, For, createSignal } from "solid-js";
|
||||
import { css } from "solid-styled";
|
||||
import tootStyle from "./toot.module.css";
|
||||
import { Portal } from "solid-js/web";
|
||||
import MediaViewer, { MEDIA_VIEWER_HEROSRC } from "./MediaViewer";
|
||||
import { HeroSourceProvider } from "../platform/anim";
|
||||
import MediaViewer from "./MediaViewer";
|
||||
|
||||
const MediaAttachmentGrid: Component<{
|
||||
attachments: mastodon.v1.MediaAttachment[];
|
||||
|
@ -58,13 +56,6 @@ const MediaAttachmentGrid: Component<{
|
|||
}
|
||||
}}
|
||||
</For>
|
||||
<HeroSourceProvider
|
||||
value={() => ({
|
||||
[MEDIA_VIEWER_HEROSRC]: rootRef.children.item(
|
||||
viewerIndex() || 0,
|
||||
) as HTMLElement,
|
||||
})}
|
||||
>
|
||||
<MediaViewer
|
||||
show={viewerOpened()}
|
||||
index={viewerIndex() || 0}
|
||||
|
@ -72,7 +63,6 @@ const MediaAttachmentGrid: Component<{
|
|||
media={props.attachments}
|
||||
onClose={() => setViewerIndex(undefined)}
|
||||
/>
|
||||
</HeroSourceProvider>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue