Skip to content

Commit 1368485

Browse files
authored
Merge pull request #7 from ServerDriven/develop
Develop
2 parents a7e063b + b4a3ac2 commit 1368485

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

Sources/ScreenData/Objects/SomeStyle.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,26 @@ public struct SomeStyle: Codable, Hashable {
55
public var foregroundColor: SomeColor?
66
public var backgroundColor: SomeColor?
77

8+
public var width: Int?
9+
public var height: Int?
10+
811
public var padding: Int
912

1013
public init(
1114
isHidden: Bool = false,
1215
cornerRadius: Int = 0,
1316
foregroundColor: SomeColor? = nil,
1417
backgroundColor: SomeColor? = nil,
18+
width: Int? = nil,
19+
height: Int? = nil,
1520
padding: Int = 0
1621
) {
1722
self.isHidden = isHidden
1823
self.cornerRadius = cornerRadius
1924
self.foregroundColor = foregroundColor
2025
self.backgroundColor = backgroundColor
26+
self.width = width
27+
self.height = height
2128
self.padding = padding
2229
}
2330
}

Sources/ScreenData/Views/SomeContainerView.swift

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

4+
public var isScrollable: Bool
45
public var axis: ViewDirectionAxis
56
public var views: [SomeView]
67

@@ -12,11 +13,13 @@ public struct SomeContainerView: Codable, Hashable {
1213

1314
public init(
1415
id: String? = nil,
16+
isScrollable: Bool,
1517
axis: ViewDirectionAxis,
1618
views: [SomeView],
1719
style: SomeStyle? = nil
1820
) {
1921
self.id = id
22+
self.isScrollable = isScrollable
2023
self.axis = axis
2124
self.views = views
2225
self.style = style

Sources/ScreenData/Views/SomeCustomView.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
public struct SomeCustomView: Codable, Hashable {
22
public var id: String?
33

4-
public var title: String
4+
public var title: String?
55
public var subtitle: String?
66

77
public var style: SomeStyle?
88

99
public var someImage: SomeImage?
1010

1111
public var destination: Destination?
12-
public var axis: ViewDirectionAxis
12+
public var axis: ViewDirectionAxis?
1313

14-
public var views: [SomeView]
14+
public var views: [SomeView]?
1515

1616
public var type: ViewType {
1717
.custom
1818
}
1919

2020
public init(
2121
id: String? = nil,
22-
title: String,
22+
title: String? = nil,
2323
subtitle: String? = nil,
2424
style: SomeStyle? = nil,
2525
someImage: SomeImage? = nil,
2626
destination: Destination? = nil,
27-
axis: ViewDirectionAxis,
28-
views: [SomeView]
27+
axis: ViewDirectionAxis? = nil,
28+
views: [SomeView]? = nil
2929
) {
3030
self.id = id
3131
self.title = title

0 commit comments

Comments
 (0)