Skip to content

Commit

Permalink
Added ability to strip "fa-" prefix from icon names
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmaddux committed Oct 25, 2019
1 parent 57960c0 commit 1981fd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/FASwiftUI/FAText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public struct FAText: View {
}

public init(iconName: String, size: CGFloat, style: FAStyle? = nil) {
self.iconName = iconName
self.iconName = iconName.hasPrefix("fa-") ? String(iconName.dropFirst(3)) : iconName
self.size = size
self.style = style
}
Expand Down

0 comments on commit 1981fd1

Please sign in to comment.