From 8c6fcee828fedf8f14b762f5600a243c8b469fdc Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 13 Jul 2023 16:30:59 -0500 Subject: [PATCH] CXTDT-423141 - Tabs - Incorrect spacing on top-aligned Fill container Signed-off-by: Matt Bruce --- VDS/Components/Tabs/Tabs.swift | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/VDS/Components/Tabs/Tabs.swift b/VDS/Components/Tabs/Tabs.swift index 9ad1e19c..6728700b 100644 --- a/VDS/Components/Tabs/Tabs.swift +++ b/VDS/Components/Tabs/Tabs.swift @@ -47,17 +47,6 @@ open class Tabs: View { public enum Size: String, CaseIterable { case medium case large - - public var textStyle: TextStyle { - if self == .medium { - return .boldBodyLarge - } else { - //specs show that the font size shouldn't change however boldTitleSmall does - //change point size between iPad/iPhone. This is a "fix" so each device will - //load the correct pointSize - return UIDevice.isIPad ? .boldTitleSmall : .boldTitleMedium - } - } } //-------------------------------------------------- @@ -220,6 +209,7 @@ open class Tabs: View { // Create new tab items from the models for model in models { let tabItem = Tab() + tabItem.size = size tabItem.text = model.text tabItem.onClick = model.onClick tabItem.width = model.width @@ -258,10 +248,10 @@ open class Tabs: View { // Update tab appearance based on properties for (index, tabItem) in tabViews.enumerated() { + tabItem.size = size tabItem.selected = selectedIndex == index tabItem.index = index tabItem.minWidth = minWidth - tabItem.size = size tabItem.textPosition = textPosition tabItem.orientation = orientation tabItem.surface = surface