Add labels to posts
This commit is contained in:
19
CHDataManagement/Views/Posts/PageIconView.swift
Normal file
19
CHDataManagement/Views/Posts/PageIconView.swift
Normal file
@ -0,0 +1,19 @@
|
||||
import SwiftUI
|
||||
import SVGView
|
||||
|
||||
struct PageIconView: View {
|
||||
|
||||
@Environment(\.colorScheme)
|
||||
private var colorScheme
|
||||
|
||||
let icon: PageIcon
|
||||
|
||||
var body: some View {
|
||||
if colorScheme == .light {
|
||||
SVGView(string: icon.svgString)
|
||||
} else {
|
||||
SVGView(string: icon.svgString)
|
||||
.colorInvert()
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user