Merge branch 'bugfix/vds-buttonIcon-update' into 'develop'
refactored to vds buttonIcon breaking change ### Summary ButtonIcon had 3 properties missing from the original requirements. Co-authored-by: Matt Bruce <matt.bruce@verizon.com> See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui/-/merge_requests/1127
This commit is contained in:
commit
759517f8fd
@ -41,7 +41,9 @@ open class ButtonIcon: VDS.ButtonIcon, VDSMoleculeViewProtocol {
|
||||
iconName = viewModel.iconName
|
||||
selectedIconName = viewModel.selectedIconName
|
||||
size = viewModel.size
|
||||
customSize = viewModel.customSize
|
||||
customContainerSize = viewModel.customContainerSize
|
||||
customIconSize = viewModel.customIconSize
|
||||
customBadgeIndicatorOffset = viewModel.customBadgeIndicatorOffSet
|
||||
floating = viewModel.floating
|
||||
fitToIcon = viewModel.fitToIcon
|
||||
hideBorder = viewModel.hideBorder
|
||||
|
||||
@ -31,7 +31,9 @@ open class ButtonIconModel: ButtonModelProtocol, MoleculeModelProtocol {
|
||||
public var iconName: Icon.Name = .info
|
||||
public var selectedIconName: Icon.Name?
|
||||
public var size = ButtonIcon.Size.large
|
||||
public var customSize : Int?
|
||||
public var customContainerSize : Int?
|
||||
public var customIconSize : Int?
|
||||
public var customBadgeIndicatorOffSet : CGPoint?
|
||||
public var floating: Bool = false
|
||||
public var fitToIcon: Bool = false
|
||||
public var hideBorder: Bool = true
|
||||
@ -85,7 +87,9 @@ open class ButtonIconModel: ButtonModelProtocol, MoleculeModelProtocol {
|
||||
case iconName
|
||||
case selectedIconName
|
||||
case size
|
||||
case customSize
|
||||
case customContainerSize
|
||||
case customIconSize
|
||||
case customBadgeIndicatorOffSet
|
||||
case floating
|
||||
case fitToIcon
|
||||
case hideBorder
|
||||
@ -110,7 +114,9 @@ open class ButtonIconModel: ButtonModelProtocol, MoleculeModelProtocol {
|
||||
iconName = try container.decode(Icon.Name.self, forKey: .iconName)
|
||||
selectedIconName = try container.decodeIfPresent(Icon.Name.self, forKey: .selectedIconName)
|
||||
size = try container.decodeIfPresent(ButtonIcon.Size.self, forKey: .size) ?? .large
|
||||
customSize = try container.decodeIfPresent(Int.self, forKey: .customSize)
|
||||
customContainerSize = try container.decodeIfPresent(Int.self, forKey: .customContainerSize)
|
||||
customIconSize = try container.decodeIfPresent(Int.self, forKey: .customIconSize)
|
||||
customBadgeIndicatorOffSet = try container.decodeIfPresent(CGPoint.self, forKey: .customBadgeIndicatorOffSet)
|
||||
floating = try container.decodeIfPresent(Bool.self, forKey: .floating) ?? false
|
||||
fitToIcon = try container.decodeIfPresent(Bool.self, forKey: .fitToIcon) ?? false
|
||||
hideBorder = try container.decodeIfPresent(Bool.self, forKey: .hideBorder) ?? false
|
||||
@ -131,7 +137,9 @@ open class ButtonIconModel: ButtonModelProtocol, MoleculeModelProtocol {
|
||||
try container.encode(iconName, forKey: .iconName)
|
||||
try container.encodeIfPresent(selectedIconName, forKey: .selectedIconName)
|
||||
try container.encodeIfPresent(size, forKey: .size)
|
||||
try container.encodeIfPresent(customSize, forKey: .customSize)
|
||||
try container.encodeIfPresent(customContainerSize, forKey: .customContainerSize)
|
||||
try container.encodeIfPresent(customIconSize, forKey: .customIconSize)
|
||||
try container.encodeIfPresent(customBadgeIndicatorOffSet, forKey: .customBadgeIndicatorOffSet)
|
||||
try container.encodeIfPresent(floating, forKey: .floating)
|
||||
try container.encodeIfPresent(fitToIcon, forKey: .fitToIcon)
|
||||
try container.encodeIfPresent(hideBorder, forKey: .hideBorder)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user