import { Flex } from '@mantine/core';
import { IconCopy, IconDownload, IconFlipHorizontal, IconFlipVertical } from '@tabler/icons-react';
import { useContextMenu } from 'mantine-contextmenu';
import { useState } from 'react';
import Picture from '~/components/Picture';
import { copyImageToClipboard, downloadImage, unsplashImages } from '~/lib/image';
import FancyButton from './FancyButton';
export default function CustomContentExample() {
const showContextMenu = useContextMenu();
const [flipVertical, setFlipVertical] = useState(false);
const [flipHorizontal, setFlipHorizontal] = useState(false);
const image = unsplashImages[7];
const { src } = image.file;
flipVertical={flipVertical}
flipHorizontal={flipHorizontal}
onContextMenu={showContextMenu((close) => (
<Flex wrap="wrap" w={200}>
icon={<IconCopy size={16} />}
copyImageToClipboard(src);
icon={<IconDownload size={16} />}
icon={<IconFlipVertical size={16} />}
setFlipVertical((v) => !v);
icon={<IconFlipHorizontal size={16} />}
setFlipHorizontal((v) => !v);