removed unneccessary enum and replace with axis

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-03-27 14:39:53 -05:00
parent 335e2825f0
commit 516674f17e

View File

@ -6,21 +6,18 @@
//
import Foundation
import UIKit
struct ButtonGroupConstants {
static let defaultSpace = 12.0
enum ButtonSpacingAxis {
case horizontal, vertical
}
/// This will determine the spacing that will go between 2 ButtonBases either horizontally or vertically
/// - Parameters:
/// - axis: horizontal/vertical
/// - primary: first ButtonBase
/// - neighboring: next ButtonBase based off of axis
/// - Returns: float value
static func getSpacing(for axis: ButtonSpacingAxis, with primary: ButtonBase, neighboring: ButtonBase) -> CGFloat {
static func getSpacing(for axis: NSLayoutConstraint.Axis, with primary: ButtonBase, neighboring: ButtonBase) -> CGFloat {
//large button
if let button = primary as? Button, button.size == .large {