mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-05-17 03:52:42 +00:00
35 lines
731 B
Swift
35 lines
731 B
Swift
import DesignSystem
|
|
import Models
|
|
import SwiftUI
|
|
|
|
public struct TagsListView: View {
|
|
@Environment(Theme.self) private var theme
|
|
|
|
let tags: [Tag]
|
|
|
|
public init(tags: [Tag]) {
|
|
self.tags = tags
|
|
}
|
|
|
|
public var body: some View {
|
|
List {
|
|
ForEach(tags) { tag in
|
|
TagRowView(tag: tag)
|
|
#if !os(visionOS)
|
|
.listRowBackground(theme.primaryBackgroundColor)
|
|
#endif
|
|
.padding(.vertical, 4)
|
|
}
|
|
}
|
|
#if !os(visionOS)
|
|
.scrollContentBackground(.hidden)
|
|
.background(theme.primaryBackgroundColor)
|
|
.listStyle(.plain)
|
|
#else
|
|
.listStyle(.grouped)
|
|
#endif
|
|
.navigationTitle("explore.section.trending.tags")
|
|
.navigationBarTitleDisplayMode(.inline)
|
|
}
|
|
}
|