@@ -8,6 +8,7 @@ public final class PickerProps: ObservableObject, Decodable {
8
8
@Published var options : [ String ] = [ ]
9
9
@Published var pickerStyle : PickerStyle = . default
10
10
@Published var disabled : Bool = false
11
+ @Published public var style : StyleProps ?
11
12
// Events
12
13
public var onChange : ( ( String ) -> Void ) ?
13
14
@@ -37,7 +38,7 @@ public final class PickerProps: ObservableObject, Decodable {
37
38
38
39
// Coding keys for decoding
39
40
enum CodingKeys : String , CodingKey , CaseIterable {
40
- case label, selection, options, pickerStyle, disabled
41
+ case label, selection, options, pickerStyle, disabled, style
41
42
}
42
43
43
44
// Decodable initializer
@@ -54,6 +55,7 @@ public final class PickerProps: ObservableObject, Decodable {
54
55
pickerStyle = . default // Default fallback
55
56
}
56
57
disabled = try container. decodeIfPresent ( Bool . self, forKey: . disabled) ?? false
58
+ style = try container. decodeIfPresent ( StyleProps . self, forKey: . style)
57
59
}
58
60
59
61
public init ( ) { }
@@ -66,6 +68,7 @@ public final class PickerProps: ObservableObject, Decodable {
66
68
case . options: options = other. options
67
69
case . pickerStyle: pickerStyle = other. pickerStyle
68
70
case . disabled: disabled = other. disabled
71
+ case . style: style = other. style
69
72
}
70
73
}
71
74
}
0 commit comments