color
This commit is contained in:
parent
8c9cf025c6
commit
117c112b6b
@ -43,6 +43,7 @@ import UIKit
|
||||
public static var identifier: String = "line"
|
||||
public var type: Style = .standard
|
||||
public var frequency: Frequency? = .allExceptTop
|
||||
public var color: Color?
|
||||
public var backgroundColor: Color?
|
||||
|
||||
public init(type: Style) {
|
||||
@ -53,6 +54,7 @@ import UIKit
|
||||
case moleculeName
|
||||
case type
|
||||
case backgroundColor
|
||||
case color
|
||||
case frequency
|
||||
}
|
||||
|
||||
@ -64,7 +66,7 @@ import UIKit
|
||||
if let frequency = try typeContainer.decodeIfPresent(Frequency.self, forKey: .frequency) {
|
||||
self.frequency = frequency
|
||||
}
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
color = try typeContainer.decodeIfPresent(Color.self, forKey: .color)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
@ -72,6 +74,6 @@ import UIKit
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encode(type, forKey: .type)
|
||||
try container.encodeIfPresent(frequency, forKey: .frequency)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encodeIfPresent(color, forKey: .color)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user