Defined the "info" and "person" static constants for the Image+Icons, String+Icons, and UIImage+Icons extensions for the UI library.
This commit is contained in:
parent
32c0ef500d
commit
5b1ca622b7
@ -62,11 +62,9 @@ private extension StarRating {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Image+Constants
|
// MARK: - Image+Constants
|
||||||
private extension Image {
|
private extension Image.Icon {
|
||||||
enum Icon {
|
static let star: Image = .init(systemName: "star")
|
||||||
static let star: Image = .init(systemName: "star")
|
static let starFill: Image = .init(systemName: "star.fill")
|
||||||
static let starFill: Image = .init(systemName: "star.fill")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Previews
|
// MARK: - Previews
|
||||||
|
19
Libraries/UI/Kit/Sources/Extensions/Image+Icons.swift
Normal file
19
Libraries/UI/Kit/Sources/Extensions/Image+Icons.swift
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// Image+Icons.swift
|
||||||
|
// ReviewsUIKit
|
||||||
|
//
|
||||||
|
// Created by Javier Cicchelli on 20/03/2024.
|
||||||
|
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
public extension Image {
|
||||||
|
enum Icon {
|
||||||
|
|
||||||
|
// MARK: Constants
|
||||||
|
public static let info = Image(systemName: .Icon.info)
|
||||||
|
public static let person = Image(systemName: .Icon.person)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
17
Libraries/UI/Kit/Sources/Extensions/String+Icons.swift
Normal file
17
Libraries/UI/Kit/Sources/Extensions/String+Icons.swift
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// String+Icons.swift
|
||||||
|
// ReviewsUIKit
|
||||||
|
//
|
||||||
|
// Created by Javier Cicchelli on 20/03/2024.
|
||||||
|
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
extension String {
|
||||||
|
enum Icon {
|
||||||
|
|
||||||
|
// MARK: Constants
|
||||||
|
static let info = "info.circle.fill"
|
||||||
|
static let person = "person.crop.circle.fill"
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
19
Libraries/UI/Kit/Sources/Extensions/UIImage+Icons.swift
Normal file
19
Libraries/UI/Kit/Sources/Extensions/UIImage+Icons.swift
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// UIImage+Icons.swift
|
||||||
|
// ReviewsUIKit
|
||||||
|
//
|
||||||
|
// Created by Javier Cicchelli on 20/03/2024.
|
||||||
|
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
public extension UIImage {
|
||||||
|
enum Icon {
|
||||||
|
|
||||||
|
// MARK: Constants
|
||||||
|
public static let info = UIImage(systemName: .Icon.info)
|
||||||
|
public static let person = UIImage(systemName: .Icon.person)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user