mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-05-17 12:02:43 +00:00
29 lines
722 B
Swift
29 lines
722 B
Swift
import SwiftUI
|
|
import DesignSystem
|
|
|
|
struct TimelineHeaderView<Content: View>: View {
|
|
@Environment(Theme.self) private var theme
|
|
|
|
var content: () -> Content
|
|
|
|
var body: some View {
|
|
VStack(alignment: .leading) {
|
|
Spacer()
|
|
content()
|
|
Spacer()
|
|
}
|
|
#if os(visionOS)
|
|
.listRowBackground(RoundedRectangle(cornerRadius: 8)
|
|
.foregroundStyle(.background).hoverEffect())
|
|
.listRowHoverEffectDisabled()
|
|
#else
|
|
.listRowBackground(theme.secondaryBackgroundColor)
|
|
#endif
|
|
.listRowSeparator(.hidden)
|
|
.listRowInsets(.init(top: 8,
|
|
leading: .layoutPadding,
|
|
bottom: 8,
|
|
trailing: .layoutPadding))
|
|
}
|
|
}
|