Skip to content

Commit ec3905d

Browse files
committed
custom loading label in progressoverlay
1 parent 23e573a commit ec3905d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

firebaseai/GenerativeAIUIComponents/Sources/GenerativeAIUIComponents/ProgressOverlay.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
import SwiftUI
1616

1717
public struct ProgressOverlay: View {
18-
public init() {}
18+
let message: String
19+
20+
public init(message: String = "Loading...") {
21+
self.message = message
22+
}
1923

2024
public var body: some View {
2125
ZStack {
@@ -32,7 +36,7 @@ public struct ProgressOverlay: View {
3236
ProgressView()
3337
.scaleEffect(1.5)
3438

35-
Text("Loading...")
39+
Text(message)
3640
.font(.subheadline)
3741
.foregroundColor(.secondary)
3842
}

0 commit comments

Comments
 (0)