IceCubesApp/Packages/Timeline/Sources/Timeline/View/TimelineHeaderView.swift
Thomas Ricouard 1f858414d8 format .
2024-02-14 12:48:14 +01:00

29 lines
718 B
Swift

import DesignSystem
import SwiftUI
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))
}
}