1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 22:00:31 +05:30
yattee/Apple TV/ViewOptionsView.swift
2021-06-28 17:27:53 +02:00

44 lines
863 B
Swift

import Defaults
import SwiftUI
struct ViewOptionsView: View {
@Environment(\.dismiss) private var dismiss
@Default(.layout) var layout
var body: some View {
HStack {
VStack {
Spacer()
HStack(alignment: .center) {
Spacer()
VStack {
nextLayoutButton
Button("Close") {
dismiss()
}
}
Spacer()
}
Spacer()
}
Spacer()
}
.background(.thinMaterial)
}
var nextLayoutButton: some View {
Button(layout.next().name, action: nextLayout)
}
func nextLayout() {
Defaults[.layout] = layout.next()
dismiss()
}
}