File tree Expand file tree Collapse file tree 2 files changed +46
-25
lines changed
GenerativeAIUIComponents/Sources/GenerativeAIUIComponents Expand file tree Collapse file tree 2 files changed +46
-25
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2025 Google LLC
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+
15+ import SwiftUI
16+
17+ public struct ProgressOverlay : View {
18+ public init ( ) { }
19+
20+ public var body : some View {
21+ ZStack {
22+ Color . black. opacity ( 0.3 )
23+ . ignoresSafeArea ( )
24+
25+ ZStack {
26+ RoundedRectangle ( cornerRadius: 16 )
27+ . fill ( Material . ultraThinMaterial)
28+ . frame ( width: 120 , height: 100 )
29+ . shadow ( radius: 8 )
30+
31+ VStack ( spacing: 12 ) {
32+ ProgressView ( )
33+ . scaleEffect ( 1.5 )
34+
35+ Text ( " Loading... " )
36+ . font ( . subheadline)
37+ . foregroundColor ( . secondary)
38+ }
39+ }
40+ }
41+ }
42+ }
43+
44+ #Preview {
45+ ProgressOverlay ( )
46+ }
Original file line number Diff line number Diff line change @@ -90,31 +90,6 @@ struct ImagenScreen: View {
9090 }
9191}
9292
93- struct ProgressOverlay : View {
94- var body : some View {
95- ZStack {
96- Color . black. opacity ( 0.3 )
97- . ignoresSafeArea ( )
98-
99- ZStack {
100- RoundedRectangle ( cornerRadius: 16 )
101- . fill ( Material . ultraThinMaterial)
102- . frame ( width: 120 , height: 100 )
103- . shadow ( radius: 8 )
104-
105- VStack ( spacing: 12 ) {
106- ProgressView ( )
107- . scaleEffect ( 1.5 )
108-
109- Text ( " Loading... " )
110- . font ( . subheadline)
111- . foregroundColor ( . secondary)
112- }
113- }
114- }
115- }
116- }
117-
11893#Preview {
11994 ImagenScreen ( firebaseService: FirebaseAI . firebaseAI ( ) )
12095}
You can’t perform that action at this time.
0 commit comments