AttachmentButtonImage
public struct AttachmentButtonImage
extension AttachmentButtonImage: View
extension AttachmentButtonImage: _ViewEmptyChecking
AttachmentButtonImage
provides the default Add
button following visual design.
Usage
@State var attachments: [URL]
@State var attachmentError: AttributedString?
let delegate: AttachmentDelegate
AttachmentGroup(
title: { Text("Attachements") },
attachments: self.$attachments,
maxCount: 5,
delegate: self.delegate,
errorMessage: self.$attachmentError,
operations: {
AttachmentButtonImage()
.operationsMenu {
PhotosPickerMenuItem(filter: [.images])
FilesPickerMenuItem(filter: [.pdf, .presentation])
}
}
)
-
Undocumented
Declaration
Swift
public init(@ViewBuilder addButtonImage: () -> any View, controlState: ControlState = .normal, componentIdentifier: String? = AttachmentButtonImage.identifier)
-
Undocumented
Declaration
Swift
static let identifier: String
-
Undocumented
Declaration
Swift
init(addButtonImage: Image = FioriIcon.actions.add.renderingMode(.template).resizable(), controlState: ControlState = .normal)
-
Undocumented
Declaration
Swift
init(_ configuration: AttachmentButtonImageConfiguration)
-
Declaration
Swift
@MainActor public var body: some View { get }
-
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }