You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/FluentUI_iOS/Components/Notification/FluentNotification.swift
+72-9Lines changed: 72 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,9 @@ import SwiftUI
23
23
/// Integer value that sets the maximum number of lines will show for a message
24
24
varmessageLineLimit:Int{getset}
25
25
26
+
/// If the message text should be expandabled to view the entire mesage if it is truncated due to the messageLineLimit
27
+
varenableExpandableMessageText:Bool{getset}
28
+
26
29
/// Optional text to draw above the message area.
27
30
vartitle:String?{getset}
28
31
@@ -99,6 +102,8 @@ public struct FluentNotification: View, TokenizedControlView {
99
102
/// - isFlexibleWidthToast: Whether the width of the toast is set based on the width of the screen or on its contents.
100
103
/// - message: Optional text for the main title area of the control. If there is a title, the message becomes subtext.
101
104
/// - attributedMessage: Optional attributed text for the main title area of the control. If there is a title, the message becomes subtext. If set, it will override the message parameter.
105
+
/// - messageLineLimit: The maximum number of lines the message can show. Any excess text is truncated.
106
+
/// - enableExpandableMessageText: If enabled, an expand button will be shown in place of the dimiss icon when the text is truncated. Tapping the expand button will display all lines of text.
102
107
/// - isPresented: Controls whether the Notification is being presented.
103
108
/// - title: Optional text to draw above the message area.
104
109
/// - attributedTitle: Optional attributed text to draw above the message area. If set, it will override the title parameter.
@@ -118,6 +123,7 @@ public struct FluentNotification: View, TokenizedControlView {
118
123
message:String?=nil,
119
124
attributedMessage:NSAttributedString?=nil,
120
125
messageLineLimit:Int=0,
126
+
enableExpandableMessageText:Bool=false,
121
127
isPresented:Binding<Bool>?=nil,
122
128
title:String?=nil,
123
129
attributedTitle:NSAttributedString?=nil,
@@ -139,6 +145,7 @@ public struct FluentNotification: View, TokenizedControlView {
0 commit comments