IceCubesApp/Packages/Explore/Sources/Explore/TagsListView.swift

29 lines
623 B
Swift
Raw Normal View History

2023-03-02 19:15:07 +00:00
import DesignSystem
2023-03-13 12:38:28 +00:00
import Models
import SwiftUI
2023-03-02 19:15:07 +00:00
public struct TagsListView: View {
@EnvironmentObject private var theme: Theme
2023-03-13 12:38:28 +00:00
2023-03-02 19:15:07 +00:00
let tags: [Tag]
2023-03-13 12:38:28 +00:00
2023-03-02 19:15:07 +00:00
public init(tags: [Tag]) {
self.tags = tags
}
2023-03-13 12:38:28 +00:00
2023-03-02 19:15:07 +00:00
public var body: some View {
List {
ForEach(tags) { tag in
TagRowView(tag: tag)
.listRowBackground(theme.primaryBackgroundColor)
.padding(.vertical, 4)
}
}
.scrollContentBackground(.hidden)
.background(theme.primaryBackgroundColor)
.listStyle(.plain)
.navigationTitle("explore.section.trending.tags")
.navigationBarTitleDisplayMode(.inline)
}
}