2023-12-30 11:30:02 +00:00
|
|
|
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()
|
|
|
|
}
|
2024-02-06 14:17:20 +00:00
|
|
|
#if os(visionOS)
|
|
|
|
.listRowBackground(RoundedRectangle(cornerRadius: 8)
|
|
|
|
.foregroundStyle(.background).hoverEffect())
|
|
|
|
.listRowHoverEffectDisabled()
|
|
|
|
#else
|
2023-12-30 11:30:02 +00:00
|
|
|
.listRowBackground(theme.secondaryBackgroundColor)
|
2024-02-06 14:17:20 +00:00
|
|
|
#endif
|
2023-12-30 11:30:02 +00:00
|
|
|
.listRowSeparator(.hidden)
|
|
|
|
.listRowInsets(.init(top: 8,
|
|
|
|
leading: .layoutPadding,
|
|
|
|
bottom: 8,
|
|
|
|
trailing: .layoutPadding))
|
|
|
|
}
|
|
|
|
}
|