forked from intitni/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTabView.swift
More file actions
32 lines (29 loc) · 990 Bytes
/
TabView.swift
File metadata and controls
32 lines (29 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import SwiftUI
struct TabView: View {
@ObservedObject var chatWindowViewModel: ChatWindowViewModel
var body: some View {
Button(action: {
chatWindowViewModel.chatPanelInASeparateWindow = false
}, label: {
Image(systemName: "ellipsis.bubble.fill")
.frame(width: Style.widgetWidth, height: Style.widgetHeight)
.background(
Color.userChatContentBackground,
in: Circle()
)
})
.buttonStyle(.plain)
.opacity(chatWindowViewModel.chatPanelInASeparateWindow ? 1 : 0)
.preferredColorScheme(chatWindowViewModel.colorScheme)
.frame(maxWidth: Style.widgetWidth, maxHeight: Style.widgetHeight)
}
}
struct TabView_Preview: PreviewProvider {
static var previews: some View {
VStack {
TabView(chatWindowViewModel: .init())
}
.frame(width: 30)
.background(Color.black)
}
}