Refine recipe overlay design
This commit is contained in:
parent
79a863d9ab
commit
8a5c874c18
@ -29,7 +29,7 @@ export default function LabeledIcon({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<span className={clsx(
|
<span className={clsx(
|
||||||
'inline-flex gap-x-1.5 md:gap-x-2 min-w-0',
|
'inline-flex gap-x-1.5 min-w-0',
|
||||||
debug && 'border border-green-500 m-[-1px]',
|
debug && 'border border-green-500 m-[-1px]',
|
||||||
className,
|
className,
|
||||||
)}>
|
)}>
|
||||||
|
|||||||
@ -30,9 +30,7 @@ export default function PhotoRecipe({
|
|||||||
icon={<IconRecipe
|
icon={<IconRecipe
|
||||||
size={16}
|
size={16}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
props.badged
|
props.badged && 'translate-x-[-1px] translate-y-[0.5px]',
|
||||||
? 'translate-x-[-1px] translate-y-[0.5px]'
|
|
||||||
: 'translate-y-[-0.5px]',
|
|
||||||
)}
|
)}
|
||||||
/>}
|
/>}
|
||||||
action={toggleRecipeOverlay &&
|
action={toggleRecipeOverlay &&
|
||||||
|
|||||||
@ -17,7 +17,6 @@ import {
|
|||||||
} from '.';
|
} from '.';
|
||||||
import { TbChecklist } from 'react-icons/tb';
|
import { TbChecklist } from 'react-icons/tb';
|
||||||
import CopyButton from '@/components/CopyButton';
|
import CopyButton from '@/components/CopyButton';
|
||||||
import { labelForFilm } from '@/film';
|
|
||||||
import PhotoRecipe from './PhotoRecipe';
|
import PhotoRecipe from './PhotoRecipe';
|
||||||
import { useAppText } from '@/i18n/state/client';
|
import { useAppText } from '@/i18n/state/client';
|
||||||
|
|
||||||
@ -107,16 +106,17 @@ export default function PhotoRecipeOverlay({
|
|||||||
// Soften shadow to mimic <Modal />
|
// Soften shadow to mimic <Modal />
|
||||||
: 'shadow-2xl/20 dark:shadow-2xl/100',
|
: 'shadow-2xl/20 dark:shadow-2xl/100',
|
||||||
'text-[13.5px] text-black',
|
'text-[13.5px] text-black',
|
||||||
'bg-white/70 border border-neutral-200/30',
|
'bg-white/70 outline outline-neutral-400/15',
|
||||||
'backdrop-blur-xl saturate-[300%]',
|
'backdrop-blur-xl saturate-[300%]',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className={clsx(
|
<div className={clsx(
|
||||||
'flex items-center gap-2 h-6',
|
'flex items-center gap-2 h-6',
|
||||||
'pl-1.5 pr-0.5',
|
'pl-1.5 pr-0.5',
|
||||||
|
'translate-y-[0.5px]',
|
||||||
)}>
|
)}>
|
||||||
<div className={clsx(
|
<div className={clsx(
|
||||||
'grow translate-y-[-0.5px]',
|
'grow translate-y-[0.5px]',
|
||||||
title && 'hover:opacity-50 active:opacity-75',
|
title && 'hover:opacity-50 active:opacity-75',
|
||||||
)}>
|
)}>
|
||||||
{title
|
{title
|
||||||
@ -160,12 +160,15 @@ export default function PhotoRecipeOverlay({
|
|||||||
<div className="col-span-8">
|
<div className="col-span-8">
|
||||||
{renderDataSquare(
|
{renderDataSquare(
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
{labelForFilm(film).medium.toLocaleUpperCase()}
|
|
||||||
<PhotoFilm
|
<PhotoFilm
|
||||||
contrast="frosted"
|
contrast="frosted"
|
||||||
film={film}
|
film={film}
|
||||||
type="icon-only"
|
className={clsx(
|
||||||
className="opacity-80 translate-y-[-0.5px]"
|
'translate-y-[-0.5px]',
|
||||||
|
'*:text-black! *:active:text-black!',
|
||||||
|
'opacity-80 hover:opacity-60 active:opacity-80',
|
||||||
|
)}
|
||||||
|
badged={false}
|
||||||
/>
|
/>
|
||||||
</div>,
|
</div>,
|
||||||
undefined,
|
undefined,
|
||||||
|
|||||||
@ -29,9 +29,9 @@ export default function PhotoRecipeOverlayButton({
|
|||||||
ref.current?.blur();
|
ref.current?.blur();
|
||||||
}}
|
}}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'text-medium',
|
'text-medium hover:text-main',
|
||||||
'rounded-md shadow-none',
|
'bg-dim hover:bg-medium active:bg-dim',
|
||||||
'border-[1.5px] border-medium',
|
'rounded-md border-transparent shadow-none',
|
||||||
'p-0 inline-flex items-center justify-center',
|
'p-0 inline-flex items-center justify-center',
|
||||||
'size-[17px] sm:size-5',
|
'size-[17px] sm:size-5',
|
||||||
'hover:bg-extra-dim active:bg-dim',
|
'hover:bg-extra-dim active:bg-dim',
|
||||||
|
|||||||
@ -167,11 +167,11 @@ html {
|
|||||||
}
|
}
|
||||||
@utility bg-medium {
|
@utility bg-medium {
|
||||||
@apply
|
@apply
|
||||||
bg-gray-200 dark:bg-gray-700
|
bg-gray-200 dark:bg-gray-700/65
|
||||||
}
|
}
|
||||||
@utility bg-dim {
|
@utility bg-dim {
|
||||||
@apply
|
@apply
|
||||||
bg-gray-100 dark:bg-gray-900/75
|
bg-gray-100 dark:bg-gray-800/70
|
||||||
}
|
}
|
||||||
@utility bg-extra-dim {
|
@utility bg-extra-dim {
|
||||||
@apply
|
@apply
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user