Add titles to recipe overlays
This commit is contained in:
parent
e1ee7ff7da
commit
325b379ed6
@ -203,6 +203,7 @@ export default function PhotoLarge({
|
|||||||
photo.filmSimulation &&
|
photo.filmSimulation &&
|
||||||
<PhotoRecipeOverlay
|
<PhotoRecipeOverlay
|
||||||
ref={refRecipe}
|
ref={refRecipe}
|
||||||
|
title={photo.recipeTitle}
|
||||||
recipe={photo.recipeData}
|
recipe={photo.recipeData}
|
||||||
simulation={photo.filmSimulation}
|
simulation={photo.filmSimulation}
|
||||||
iso={photo.isoFormatted}
|
iso={photo.isoFormatted}
|
||||||
|
|||||||
@ -6,10 +6,11 @@ import clsx from 'clsx/lite';
|
|||||||
import { ReactNode, RefObject } from 'react';
|
import { ReactNode, RefObject } from 'react';
|
||||||
import { IoCloseCircle } from 'react-icons/io5';
|
import { IoCloseCircle } from 'react-icons/io5';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import { addSign, formatWhiteBalance, RecipeProps } from '.';
|
import { addSign, formatRecipe, formatWhiteBalance, RecipeProps } from '.';
|
||||||
|
|
||||||
export default function PhotoRecipeOverlay({
|
export default function PhotoRecipeOverlay({
|
||||||
ref,
|
ref,
|
||||||
|
title,
|
||||||
recipe,
|
recipe,
|
||||||
simulation,
|
simulation,
|
||||||
iso,
|
iso,
|
||||||
@ -74,7 +75,7 @@ export default function PhotoRecipeOverlay({
|
|||||||
exit={{ opacity: 0, translateY: -10 }}
|
exit={{ opacity: 0, translateY: -10 }}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'z-10',
|
'z-10',
|
||||||
'w-[19rem] p-3 space-y-3',
|
'w-[20rem] p-3 space-y-2',
|
||||||
'rounded-lg shadow-2xl',
|
'rounded-lg shadow-2xl',
|
||||||
'text-[13.5px] text-black',
|
'text-[13.5px] text-black',
|
||||||
'bg-white/70 border border-neutral-200/30',
|
'bg-white/70 border border-neutral-200/30',
|
||||||
@ -82,17 +83,25 @@ export default function PhotoRecipeOverlay({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<PhotoFilmSimulation
|
<div className="flex items-center gap-2 grow truncate">
|
||||||
contrast="frosted"
|
<div className={clsx(
|
||||||
className="grow"
|
'truncate text-sm uppercase',
|
||||||
simulation={simulation}
|
'translate-y-[0.5px] tracking-wide grow',
|
||||||
/>
|
)}>
|
||||||
|
{title ? formatRecipe(title) : 'Recipe'}
|
||||||
|
</div>
|
||||||
|
<PhotoFilmSimulation
|
||||||
|
contrast="frosted"
|
||||||
|
simulation={simulation}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<LoaderButton
|
<LoaderButton
|
||||||
icon={<IoCloseCircle size={20} />}
|
icon={<IoCloseCircle size={20} />}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'link p-0 m-0 h-4!',
|
'link p-0 m-0 h-4!',
|
||||||
'text-black/40 active:text-black/75',
|
'text-black/40 active:text-black/75',
|
||||||
|
'translate-y-[2.5px]',
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -34,8 +34,9 @@ export default function RecipeHeader({
|
|||||||
photo?.recipeData &&
|
photo?.recipeData &&
|
||||||
photo?.filmSimulation
|
photo?.filmSimulation
|
||||||
) ? setRecipeModalProps?.({
|
) ? setRecipeModalProps?.({
|
||||||
simulation: photo.filmSimulation,
|
title: photo.recipeTitle,
|
||||||
recipe: photo.recipeData,
|
recipe: photo.recipeData,
|
||||||
|
simulation: photo.filmSimulation,
|
||||||
iso: photo.isoFormatted,
|
iso: photo.isoFormatted,
|
||||||
exposure: photo.exposureTimeFormatted,
|
exposure: photo.exposureTimeFormatted,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -17,6 +17,7 @@ export type RecipeWithCount = {
|
|||||||
export type Recipes = RecipeWithCount[]
|
export type Recipes = RecipeWithCount[]
|
||||||
|
|
||||||
export interface RecipeProps {
|
export interface RecipeProps {
|
||||||
|
title?: string
|
||||||
recipe: FujifilmRecipe
|
recipe: FujifilmRecipe
|
||||||
simulation: FilmSimulation
|
simulation: FilmSimulation
|
||||||
iso?: string
|
iso?: string
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user