yattee/Shared/Player/Controls/ControlBackgroundModifier.swift
2023-07-24 19:45:30 +02:00

17 lines
336 B
Swift

import Foundation
import SwiftUI
struct ControlBackgroundModifier: ViewModifier {
var enabled = true
var edgesIgnoringSafeArea = Edge.Set()
func body(content: Content) -> some View {
if enabled {
content
.background(.thinMaterial)
} else {
content
}
}
}