Rework storage structs, link preview
This commit is contained in:
29
CHDataManagement/Views/LinkPreviewDetailView.swift
Normal file
29
CHDataManagement/Views/LinkPreviewDetailView.swift
Normal file
@ -0,0 +1,29 @@
|
||||
import SwiftUI
|
||||
|
||||
struct LinkPreviewDetailView: View {
|
||||
|
||||
@ObservedObject
|
||||
var linkPreview: LinkPreview
|
||||
|
||||
let fallbackTitle: String?
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
OptionalStringPropertyView(
|
||||
title: "Preview Title",
|
||||
text: $linkPreview.title,
|
||||
prompt: fallbackTitle,
|
||||
footer: "The title to use in a link preview")
|
||||
|
||||
OptionalImagePropertyView(
|
||||
title: "Preview Image",
|
||||
selectedImage: $linkPreview.image,
|
||||
footer: "The image to show in a link preview")
|
||||
|
||||
OptionalTextFieldPropertyView(
|
||||
title: "Preview Description",
|
||||
text: $linkPreview.description,
|
||||
footer: "The description to show in a link preview")
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user