Skip to content

Commit fc1e9f1

Browse files
committed
fix: all controlItem tokens
1 parent 8f1ad37 commit fc1e9f1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

OUDS/Core/Components/Sources/Controls/Switch/OUDSSwitch.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ public struct OUDSSwitch: View {
108108
SwitchIndicator(interactionState: interactionState, isOn: isOn)
109109
.frame(minWidth: theme.switch.sizeMinWidth,
110110
minHeight: theme.switch.sizeMinHeight,
111-
maxHeight: theme.switch.sizeMaxHeight)
111+
maxHeight: theme.switch.sizeMaxHeight,
112+
alignment: .center)
112113
}
113114
.accessibilityRemoveTraits([.isButton]) // .isToggle trait for iOS 17+
114115
.accessibilityLabel(a11yLabel)

OUDS/Core/Components/Sources/_/Internal/ControlItem/ControlItemContent.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ struct ControlItemContent: View {
6262
.padding(.horizontal, theme.controlItem.spacePaddingInline)
6363
}
6464
}
65-
.frame(maxWidth: theme.controlItem.sizeMaxWidth)
66-
.frame(minHeight: theme.controlItem.sizeMinHeight)
65+
.frame(minWidth: theme.controlItem.sizeMinWidth, maxWidth: theme.controlItem.sizeMaxWidth, minHeight: theme.controlItem.sizeMinHeight, alignment: .center)
6766
.contentShape(Rectangle()) // Needed otherwise because of button style any empty space without views won't trigger tap
6867
.clipShape(RoundedRectangle(cornerRadius: theme.controlItem.borderRadius))
6968
}

OUDS/Core/Components/Sources/_/Internal/ControlItem/ControlItemIndicatorContainer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ struct ControlItemIndicatorContainer: View {
4141
CheckboxIndicator(interactionState: interactionState, indicatorState: binding.wrappedValue, isError: layoutData.isError)
4242
}
4343
}
44-
.frame(maxHeight: theme.controlItem.sizeMaxHeightAssetsContainer, alignment: .center)
44+
.frame(minHeight: theme.controlItem.sizeIcon, maxHeight: theme.controlItem.sizeMaxHeightAssetsContainer, alignment: .center)
4545
}
4646
}

0 commit comments

Comments
 (0)