20 lines
360 B
Swift
20 lines
360 B
Swift
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()
|
|
}
|
|
}
|
|
}
|