Tried to optimize product page

This commit is contained in:
Henrik Larsson
2023-08-11 10:19:55 +02:00
parent a7efbf8fc3
commit 767245672c
18 changed files with 190 additions and 263 deletions

View File

@@ -1,9 +1,9 @@
'use client';
import SanityImage from '@/components/ui/sanity-image/sanity-image';
import type { Product } from '@/lib/storm/product';
import Price from 'components/product/price';
import Text from 'components/ui/text';
import type { Product } from 'lib/storm/types/product';
import { cn } from 'lib/utils';
import Link from 'next/link';
import { FC } from 'react';

View File

@@ -24,7 +24,7 @@ const SheetOverlay = React.forwardRef<
>(({ className, ...props }, ref) => (
<SheetPrimitive.Overlay
className={cn(
'fixed inset-0 z-50 bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
'fixed inset-0 z-50 bg-foreground/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
className
)}
{...props}

View File

@@ -71,7 +71,7 @@ const Text: FunctionComponent<TextProps> = ({
variant === 'sectionHeading',
['text-sm leading-tight lg:text-base']: variant === 'listChildHeading',
['max-w-prose text-lg text-high-contrast lg:text-xl']: variant === 'label',
['max-w-prose lg:text-lg 2xl:text-xl']: variant === 'paragraph'
['max-w-prose']: variant === 'paragraph'
},
className
)}