AINotice
AINotice
is a SwiftUI view indicating if content is AI-supported or AI-generated. It can include an icon, a description, and an action label for accessing more details. If the icon or description is not set, a default value will be used. Action label has no default value and has to be set to be used.
Usage
@State var showsAction = false
KeyValueItem {
Text("Marital Status Since*")
} value: {
Text(self.maritalStatusSince)
}
.id(self.maritalStatusSinceId)
.aiNoticeView(isPresented: self.$showAINotice, icon: Image(fioriName: "fiori.ai"), description: "AI Notice with icon. ", actionLabel: "View more details", viewMoreAction: self.toggleShowSheet)
.sheet(isPresented: self.$showBottomSheet) {
Text("detail information")
.presentationDetents([.height(250), .medium])
.presentationDragIndicator(.visible)
}
-
Undocumented
Declaration
Swift
public init(@ViewBuilder icon: () -> any View = { EmptyView() }, description: AttributedString? = nil, actionLabel: AttributedString? = nil, viewMoreAction: (() -> Void)? = nil, viewAlignment: HorizontalAlignment = .leading, componentIdentifier: String? = AINotice.identifier)
-
Undocumented
Declaration
Swift
static let identifier: String
-
Undocumented
Declaration
Swift
init(icon: Image? = nil, description: AttributedString? = nil, actionLabel: AttributedString? = nil, viewMoreAction: (() -> Void)? = nil, viewAlignment: HorizontalAlignment = .leading)
-
Undocumented
Declaration
Swift
init(_ configuration: AINoticeConfiguration)
-
Declaration
Swift
public var body: some View { get }
-
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }