Skip to content

Commit f05e6e3

Browse files
committed
Added ImageAspectScale
1 parent b4a3ac2 commit f05e6e3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public enum ImageAspectScale: String {
2+
case fit
3+
case fill
4+
}

Sources/ScreenData/Views/SomeImage.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ public struct SomeImage: Codable, Hashable {
22
public var id: String?
33

44
public var url: String
5+
public var aspectScale: ImageAspectScale
56

67
public var style: SomeStyle?
78

@@ -14,11 +15,13 @@ public struct SomeImage: Codable, Hashable {
1415
public init(
1516
id: String? = nil,
1617
url: String,
18+
aspectScale: ImageAspectScale,
1719
style: SomeStyle? = nil,
1820
destination: Destination? = nil
1921
) {
2022
self.id = id
2123
self.url = url
24+
self.aspectScale = aspectScale
2225
self.style = style
2326
self.destination = destination
2427
}

0 commit comments

Comments
 (0)