IceCubesApp/Packages/DesignSystem/Sources/DesignSystem/SFSymbols.swift
Gareth Simpson 9ebe0b314c
Change arrows icon to rocket for boosts (#1099)
* Change arrows icon to rocket for boosts

* Fixing case (part 1)

* Fixing Case (part 2)

* Clean up after merge

* Fix for disabled boost

* Fixes

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-02-28 14:53:31 +01:00

22 lines
464 B
Swift

import Foundation
import SwiftUI
// Functions to cope with extending SF symbols
// images named in lower case are Apple's symbols
// images inamed in CamelCase are custom
extension Label where Title == Text, Icon == Image {
public init (_ title: LocalizedStringKey, imageNamed: String) {
if imageNamed.lowercased() == imageNamed {
self.init(title, systemImage: imageNamed)
}
else {
self.init(title, image: imageNamed)
}
}
}