diff --git a/src/components/Lightbox.tsx b/src/components/Lightbox.tsx index 417cee0..9c23068 100644 --- a/src/components/Lightbox.tsx +++ b/src/components/Lightbox.tsx @@ -87,6 +87,7 @@ type Props = { index?: number onClose: () => void onDelete?: (imageIndex: number) => void + onCrop?: (imageIndex: number) => void photos: string[] title?: string description?: string @@ -94,11 +95,12 @@ type Props = { style?: LightboxStyle } -const Lightbox = ({ index, onClose, onDelete, photos, title, description, content, style }: Props) => { +const Lightbox = ({ index, onClose, onDelete, onCrop, photos, title, description, content, style }: Props) => { const initialImageIndex = index ?? 0 const [currentImageIndex, setCurrentImageIndex] = useState() const onPressDelete = onDelete ? () => onDelete(currentImageIndex ?? initialImageIndex) : undefined + const onPressCrop = onCrop ? () => onCrop(currentImageIndex ?? initialImageIndex) : undefined return ( ) }