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()
        }
    }
}
