Skip to content

Commit

Permalink
Merge pull request #779 from trash-lobster/next
Browse files Browse the repository at this point in the history
  • Loading branch information
sphinxrave authored Aug 23, 2024
2 parents 24a8bf9 + 230b31b commit 613a9a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/react/src/components/video/VideoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
selectedVideoSetReadonlyAtom,
useVideoSelection,
} from "@/hooks/useVideoSelection";
import { isMobileAtom } from "@/hooks/useFrame";

export type VideoCardType = VideoRef &
Partial<VideoBase> &
Expand Down Expand Up @@ -85,6 +86,7 @@ export function VideoCard({

const selectedSet = useAtomValue(selectedVideoSetReadonlyAtom);
const { selectionMode, addVideo, removeVideo } = useVideoSelection();
const isMobile = useAtomValue(isMobileAtom);

const goToVideoClickHandler = useCallback(
(evt: React.MouseEvent<HTMLElement, MouseEvent>) => {
Expand Down Expand Up @@ -304,7 +306,10 @@ export function VideoCard({
<Button
variant="ghost"
size="icon-lg"
className="absolute right-0 top-0 h-8 w-6 rounded-sm opacity-0 group-hover:opacity-100"
className={cn("absolute right-0 top-0 h-8 w-6 rounded-sm", {
"opacity-100": isMobile,
"opacity-0 group-hover:opacity-100": !isMobile,
})}
onClickCapture={(e) => {
e.preventDefault();
e.stopPropagation();
Expand Down

0 comments on commit 613a9a9

Please sign in to comment.