# Conflicts: # VDS.xcodeproj/project.pbxproj # VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift # VDS/Components/Notification/Notification.swift # VDS/Components/TextFields/EntryFieldBase.swift # VDS/Components/TileContainer/TileContainer.swift # VDS/Extensions/VDSLayout.swift Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
64 lines
2.6 KiB
Swift
64 lines
2.6 KiB
Swift
//
|
|
// IconName.swift
|
|
// VDS
|
|
//
|
|
// Created by Matt Bruce on 1/9/23.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
import VDSTokens
|
|
|
|
extension Icon {
|
|
|
|
/// A representation that will be used to render the icon with corresponding name.
|
|
///
|
|
/// A Icon.Name will only show up as a selection if the developer has created one and added to the Icon.Name namespace.
|
|
/// ```
|
|
/// /// add the new Icon.Name to the namespace.
|
|
/// extension Icon.Name {
|
|
/// public static let foo = Name(name: "foo-image")
|
|
/// }
|
|
///
|
|
/// /// use the new Icon.Name you just created.
|
|
/// let icon = Icon()
|
|
/// icon.name = .foo
|
|
/// ```
|
|
public struct Name: RawRepresentable {
|
|
public typealias RawValue = String
|
|
public var rawValue: String
|
|
|
|
public init?(rawValue: String) {
|
|
self.rawValue = rawValue
|
|
}
|
|
|
|
public init(name: String){
|
|
self.rawValue = name
|
|
}
|
|
internal static let checkmarkAltBold = Name(name: "checkmark-alt-bold")
|
|
internal static let checkmarkBold = Name(name: "checkmark-bold")
|
|
internal static let closeBold = Name(name: "close-bold")
|
|
internal static let errorBold = Name(name: "error-bold")
|
|
internal static let infoBold = Name(name: "info-bold")
|
|
internal static let leftCaretBold = Name(name: "left-caret-bold")
|
|
internal static let paginationLeftArrow = Name(name: "pagination-left-arrow")
|
|
internal static let paginationLeftCaret = Name(name: "pagination-left-caret")
|
|
internal static let rightCaretBold = Name(name: "right-caret-bold")
|
|
internal static let paginationRightArrow = Name(name: "pagination-right-arrow")
|
|
internal static let paginationRightCaret = Name(name: "pagination-right-caret")
|
|
internal static let verizonUp = Name(name: "verizon-up")
|
|
internal static let warningBold = Name(name: "warning-bold")
|
|
public static let checkmark = Name(name: "checkmark")
|
|
public static let checkmarkAlt = Name(name: "checkmark-alt")
|
|
public static let close = Name(name: "close")
|
|
public static let error = Name(name: "error")
|
|
public static let info = Name(name: "info")
|
|
public static let multipleDocuments = Name(name: "multiple-documents")
|
|
public static let leftArrow = Name(name: "left-arrow")
|
|
public static let leftCaret = Name(name: "left-caret")
|
|
public static let rightArrow = Name(name: "right-arrow")
|
|
public static let rightCaret = Name(name: "right-caret")
|
|
public static let warning = Name(name: "warning")
|
|
}
|
|
}
|