From fdcb59451160c0d5beda94170116cfe89f3353f7 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 9 Jan 2026 09:30:29 -0600 Subject: [PATCH] Signed-off-by: Matt Bruce --- .../Views/Components/PhotoPickerWithCropper.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/BusinessCard/Views/Components/PhotoPickerWithCropper.swift b/BusinessCard/Views/Components/PhotoPickerWithCropper.swift index a15d314..3396e3d 100644 --- a/BusinessCard/Views/Components/PhotoPickerWithCropper.swift +++ b/BusinessCard/Views/Components/PhotoPickerWithCropper.swift @@ -8,9 +8,20 @@ import Bedrock struct PhotoPickerWithCropper: View { @Environment(\.dismiss) private var dismiss + let aspectRatio: CropAspectRatio let onSave: (Data) -> Void let onCancel: () -> Void + init( + aspectRatio: CropAspectRatio = .square, + onSave: @escaping (Data) -> Void, + onCancel: @escaping () -> Void + ) { + self.aspectRatio = aspectRatio + self.onSave = onSave + self.onCancel = onCancel + } + @State private var selectedItem: PhotosPickerItem? @State private var imageData: Data? @State private var showingCropper = false @@ -41,6 +52,7 @@ struct PhotoPickerWithCropper: View { if showingCropper, let imageData { PhotoCropperSheet( imageData: imageData, + aspectRatio: aspectRatio, shouldDismissOnComplete: false ) { croppedData in if let croppedData {