added preview for views
This commit is contained in:
1 parent
1650145d4d
commit
1e2670903f
36 files changed
+744
-16
No files matched your search
@@ -59,11 +59,12 @@ struct MediaViewer: View {
|
||||
.ignoresSafeArea(edges: .bottom)
|
||||
|
||||
VStack(spacing: 0) {
|
||||
Spacer()
|
||||
HStack {
|
||||
Text(item.title)
|
||||
.font(.headline)
|
||||
.foregroundStyle(.white)
|
||||
.lineLimit(1)
|
||||
// Text(item.title)
|
||||
// .font(.headline)
|
||||
// .foregroundStyle(.white)
|
||||
// .lineLimit(1)
|
||||
|
||||
Spacer()
|
||||
|
||||
@@ -88,8 +89,6 @@ struct MediaViewer: View {
|
||||
)
|
||||
.ignoresSafeArea()
|
||||
)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
.offset(y: dragOffset)
|
||||
@@ -398,3 +397,15 @@ private struct ZoomablePhotoView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
MediaViewer(
|
||||
item: MediaViewerItem(
|
||||
id: "preview",
|
||||
url: URL(fileURLWithPath: "/tmp/preview-photo.jpg"),
|
||||
kind: .photo,
|
||||
title: "IMG_1234.jpg"
|
||||
),
|
||||
onClose: {}
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user