First version
This commit is contained in:
19
CHDataManagement/Preview Content/MockImage.swift
Normal file
19
CHDataManagement/Preview Content/MockImage.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
import SwiftUI
|
||||
|
||||
/// An image loaded from the app resources for test purposes
|
||||
struct MockImage {
|
||||
|
||||
let name: String
|
||||
|
||||
static var images: [ImageResource] {
|
||||
["image1", "image2", "image3", "image4"]
|
||||
.map(ImageResource.init)
|
||||
}
|
||||
}
|
||||
|
||||
extension MockImage: ExpressibleByStringLiteral {
|
||||
|
||||
init(stringLiteral value: StringLiteralType) {
|
||||
self.name = value
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user