Compare commits
No commits in common. 'da835189c579a386b142fafea0b88dd769c434e7' and '45d53a96173e22dad6c914ea574f6d8a1ce32219' have entirely different histories.
da835189c5
...
45d53a9617
@ -1,34 +0,0 @@
|
||||
import { Box } from "@styled-system/jsx";
|
||||
import { HoverCard } from "@ark-ui/react";
|
||||
import { IconButton } from "@/components/ui/icon-button";
|
||||
import Image from "next/image";
|
||||
import { ImageIcon } from "lucide-react";
|
||||
import { Media } from "@/payload-types";
|
||||
import { css } from "@styled-system/css";
|
||||
|
||||
export default function MenuItemImage({ image }: { image: Media }) {
|
||||
return (
|
||||
<HoverCard.Root>
|
||||
<HoverCard.Trigger asChild>
|
||||
<IconButton variant="ghost">
|
||||
<ImageIcon />
|
||||
</IconButton>
|
||||
</HoverCard.Trigger>
|
||||
<HoverCard.Positioner>
|
||||
<HoverCard.Content>
|
||||
<HoverCard.Arrow>
|
||||
<HoverCard.ArrowTip />
|
||||
</HoverCard.Arrow>
|
||||
<Box w={250} h={150} position="relative">
|
||||
<Image
|
||||
src={(image as Media).url!}
|
||||
alt={(image as Media).alt ?? ""}
|
||||
className={css({ objectFit: "cover" })}
|
||||
fill
|
||||
/>
|
||||
</Box>
|
||||
</HoverCard.Content>
|
||||
</HoverCard.Positioner>
|
||||
</HoverCard.Root>
|
||||
);
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
import { Box, HStack, Stack } from "@styled-system/jsx";
|
||||
import { Media, MenuItemTag } from "@/payload-types";
|
||||
|
||||
import { HoverCard } from "@/components/ui/hover-card";
|
||||
import { IconButton } from "@/components/ui/icon-button";
|
||||
import Image from "next/image";
|
||||
import { Image as ImageIcon } from "lucide-react";
|
||||
import { Locale } from "@/i18n/settings";
|
||||
import MenuItemImage from "@/app/(frontend)/[locale]/menu/menu-item-image";
|
||||
import RichText from "@/components/rich-text";
|
||||
import { TabContentBaseProps } from "@ark-ui/react";
|
||||
import { Tabs } from "@/components/ui/tabs";
|
||||
import { Text } from "@/components/ui/text";
|
||||
import { css } from "@styled-system/css";
|
||||
import { formatToCHF } from "@/utils/formatters";
|
||||
import { getMenuItems } from "@/api";
|
||||
|
||||
export default function MenuItemTag({ tag }: { tag: MenuItemTag }) {
|
||||
return (
|
||||
<HoverCard.Root>
|
||||
<HoverCard.Trigger asChild>
|
||||
<Box bg="accent.a8" color="white" fontSize="xs" borderRadius="md" p={1}>
|
||||
{(tag as MenuItemTag).name}
|
||||
</Box>
|
||||
</HoverCard.Trigger>
|
||||
<HoverCard.Positioner>
|
||||
<HoverCard.Content p={2} pb={0.5}>
|
||||
<HoverCard.Arrow>
|
||||
<HoverCard.ArrowTip />
|
||||
</HoverCard.Arrow>
|
||||
{(tag as MenuItemTag).description !== undefined && (
|
||||
<RichText
|
||||
content={(tag as MenuItemTag).description}
|
||||
className={css({ fontSize: "sm" })}
|
||||
/>
|
||||
)}
|
||||
</HoverCard.Content>
|
||||
</HoverCard.Positioner>
|
||||
</HoverCard.Root>
|
||||
);
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
import { HStack } from "@styled-system/jsx";
|
||||
import React from "react";
|
||||
import { Text } from "@/components/ui/text";
|
||||
|
||||
type FeatureToggleProps = {
|
||||
feature: boolean;
|
||||
icon: React.ComponentType;
|
||||
label: string;
|
||||
};
|
||||
|
||||
export default function FeatureToggle({ feature, icon: Icon, label }: FeatureToggleProps) {
|
||||
return (
|
||||
feature && (
|
||||
<HStack alignItems="center">
|
||||
<Icon />
|
||||
<Text>{label}</Text>
|
||||
</HStack>
|
||||
)
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue