added 2 properties that were missed in the initial refactor
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
d024b3dd62
commit
6453272731
@ -63,6 +63,10 @@ import VDS
|
|||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
open func viewModelDidUpdate() {
|
open func viewModelDidUpdate() {
|
||||||
|
borderLine = viewModel.borderLine
|
||||||
|
if let minWidth = viewModel.minWidth {
|
||||||
|
self.minWidth = minWidth
|
||||||
|
}
|
||||||
orientation = viewModel.orientation
|
orientation = viewModel.orientation
|
||||||
indicatorPosition = viewModel.indicatorPosition
|
indicatorPosition = viewModel.indicatorPosition
|
||||||
overflow = viewModel.overflow
|
overflow = viewModel.overflow
|
||||||
|
|||||||
@ -23,6 +23,8 @@ open class TabsModel: MoleculeModelProtocol {
|
|||||||
open var overflow: Tabs.Overflow = .scroll
|
open var overflow: Tabs.Overflow = .scroll
|
||||||
open var fillContainer: Bool = false
|
open var fillContainer: Bool = false
|
||||||
open var size: Tabs.Size = .medium
|
open var size: Tabs.Size = .medium
|
||||||
|
open var borderLine: Bool = true
|
||||||
|
open var minWidth: CGFloat?
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
|
|
||||||
// Must be capped to 0...(tabs.count - 1)
|
// Must be capped to 0...(tabs.count - 1)
|
||||||
@ -39,6 +41,8 @@ open class TabsModel: MoleculeModelProtocol {
|
|||||||
case fillContainer
|
case fillContainer
|
||||||
case overflow
|
case overflow
|
||||||
case size
|
case size
|
||||||
|
case borderLine
|
||||||
|
case minWidth
|
||||||
case style
|
case style
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,6 +79,15 @@ open class TabsModel: MoleculeModelProtocol {
|
|||||||
if let size = try typeContainer.decodeIfPresent(VDS.Tabs.Size.self, forKey: .orientation) {
|
if let size = try typeContainer.decodeIfPresent(VDS.Tabs.Size.self, forKey: .orientation) {
|
||||||
self.size = size
|
self.size = size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let borderLine = try typeContainer.decodeIfPresent(Bool.self, forKey: .borderLine) {
|
||||||
|
self.borderLine = borderLine
|
||||||
|
}
|
||||||
|
|
||||||
|
if let minWidth = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .minWidth) {
|
||||||
|
self.minWidth = minWidth
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open func encode(to encoder: Encoder) throws {
|
open func encode(to encoder: Encoder) throws {
|
||||||
@ -89,7 +102,8 @@ open class TabsModel: MoleculeModelProtocol {
|
|||||||
try container.encode(overflow, forKey: .overflow)
|
try container.encode(overflow, forKey: .overflow)
|
||||||
try container.encode(size, forKey: .size)
|
try container.encode(size, forKey: .size)
|
||||||
try container.encode(indicatorPosition, forKey: .indicatorPosition)
|
try container.encode(indicatorPosition, forKey: .indicatorPosition)
|
||||||
|
try container.encode(borderLine, forKey: .borderLine)
|
||||||
|
try container.encodeIfPresent(minWidth, forKey: .minWidth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user