diff --git a/MVMCoreUI/Atomic/Atoms/Views/ButtonIcon.swift b/MVMCoreUI/Atomic/Atoms/Views/ButtonIcon.swift index 89237662..50802ff9 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/ButtonIcon.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/ButtonIcon.swift @@ -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 diff --git a/MVMCoreUI/Atomic/Atoms/Views/ButtonIconModel.swift b/MVMCoreUI/Atomic/Atoms/Views/ButtonIconModel.swift index ed93e969..aefa9dfe 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/ButtonIconModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/ButtonIconModel.swift @@ -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)