Skip to content
Closed
Show file tree
Hide file tree
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
18 changes: 15 additions & 3 deletions Classes/Enums/Awesome.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation

public struct Awesome {

public enum Brand: String, Amazing {
public enum Brand: String, Amazing, CaseIterable {
case fa500px = "\u{f26e}"
case accessibleIcon = "\u{f368}"
case accusoft = "\u{f369}"
Expand Down Expand Up @@ -469,12 +469,16 @@ public struct Awesome {
case youtubeSquare = "\u{f431}"
case zhihu = "\u{f63f}"

public static func withKey(_ label: String) -> Brand? {
return self.allCases.first { label == "\($0)" }
}

public var fontType: AwesomeFont {
return Awesome.Font.brand
}
}

public enum Solid: String, Amazing {
public enum Solid: String, Amazing, CaseIterable {
case ad = "\u{f641}"
case addressBook = "\u{f2b9}"
case addressCard = "\u{f2bb}"
Expand Down Expand Up @@ -1477,12 +1481,16 @@ public struct Awesome {
case yenSign = "\u{f157}"
case yinYang = "\u{f6ad}"

public static func withKey(_ label: String) -> Solid? {
return self.allCases.first { label == "\($0)" }
}

public var fontType: AwesomeFont {
return Awesome.Font.solid
}
}

public enum Regular: String, Amazing {
public enum Regular: String, Amazing, CaseIterable {
case addressBook = "\u{f2b9}"
case addressCard = "\u{f2bb}"
case angry = "\u{f556}"
Expand Down Expand Up @@ -1635,6 +1643,10 @@ public struct Awesome {
case windowMinimize = "\u{f2d1}"
case windowRestore = "\u{f2d2}"

public static func withKey(_ label: String) -> Regular? {
return self.allCases.first { label == "\($0)" }
}

public var fontType: AwesomeFont {
return Awesome.Font.regular
}
Expand Down
33 changes: 26 additions & 7 deletions Classes/Enums/AwesomePro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation

public struct AwesomePro {

public enum Regular: String, Amazing {
public enum Regular: String, Amazing, CaseIterable {
case abacus = "\u{f640}"
case acorn = "\u{f6ae}"
case ad = "\u{f641}"
Expand Down Expand Up @@ -1865,12 +1865,16 @@ public struct AwesomePro {
case yenSign = "\u{f157}"
case yinYang = "\u{f6ad}"

public static func withKey(_ label: String) -> Regular? {
return self.allCases.first { label == "\($0)" }
}

public var fontType: AwesomeFont {
return AwesomePro.Font.regular
}
}

public enum Brand: String, Amazing {
public enum Brand: String, Amazing, CaseIterable {
case fa500px = "\u{f26e}"
case accessibleIcon = "\u{f368}"
case accusoft = "\u{f369}"
Expand Down Expand Up @@ -2328,12 +2332,16 @@ public struct AwesomePro {
case youtubeSquare = "\u{f431}"
case zhihu = "\u{f63f}"

public static func withKey(_ label: String) -> Brand? {
return self.allCases.first { label == "\($0)" }
}

public var fontType: AwesomeFont {
return AwesomePro.Font.brand
}
}

public enum Solid: String, Amazing {
public enum Solid: String, Amazing, CaseIterable {
case abacus = "\u{f640}"
case acorn = "\u{f6ae}"
case ad = "\u{f641}"
Expand Down Expand Up @@ -4187,12 +4195,16 @@ public struct AwesomePro {
case yenSign = "\u{f157}"
case yinYang = "\u{f6ad}"

public static func withKey(_ label: String) -> Solid? {
return self.allCases.first { label == "\($0)" }
}

public var fontType: AwesomeFont {
return AwesomePro.Font.solid
}
}

public enum Light: String, Amazing {
public enum Light: String, Amazing, CaseIterable {
case abacus = "\u{f640}"
case acorn = "\u{f6ae}"
case ad = "\u{f641}"
Expand Down Expand Up @@ -6046,12 +6058,16 @@ public struct AwesomePro {
case yenSign = "\u{f157}"
case yinYang = "\u{f6ad}"

public static func withKey(_ label: String) -> Light? {
return self.allCases.first { label == "\($0)" }
}

public var fontType: AwesomeFont {
return AwesomePro.Font.light
}
}

public enum Duotone: String, Amazing {
public enum Duotone: String, Amazing, CaseIterable {
case abacus = "\u{f640}"
case acorn = "\u{f6ae}"
case ad = "\u{f641}"
Expand Down Expand Up @@ -7905,9 +7921,12 @@ public struct AwesomePro {
case yenSign = "\u{f157}"
case yinYang = "\u{f6ad}"

public static func withKey(_ label: String) -> Duotone? {
return self.allCases.first { label == "\($0)" }
}

public var fontType: AwesomeFont {
return AwesomePro.Font.duotone
}
}

}
}