yattee/Shared/Player/Controls/ControlBackgroundModifier.swift

17 lines
336 B
Swift
Raw Normal View History

import Foundation
import SwiftUI
struct ControlBackgroundModifier: ViewModifier {
var enabled = true
var edgesIgnoringSafeArea = Edge.Set()
func body(content: Content) -> some View {
if enabled {
2023-07-01 16:38:11 +00:00
content
2022-08-06 13:26:59 +00:00
.background(.thinMaterial)
} else {
content
}
}
}