Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions swift-paperless/Views/IconTintLabelStyle.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// IconColorLabelStyle.swift
// swift-paperless
//
// Created by Paul Gessinger on 20.01.26.
//

import SwiftUI

struct IconTintLabelStyle: LabelStyle {
private let color: Color

init(_ color: Color) {
self.color = color
}

func makeBody(configuration: Configuration) -> some View {
Label(
title: { configuration.title },
icon: { configuration.icon.foregroundStyle(color) }
)
}
}

extension LabelStyle where Self == IconTintLabelStyle {
static func iconTint(_ color: Color) -> Self {
IconTintLabelStyle(color)
}
}
Loading