vds_ios/VDS/Components/Tabs/TabModel.swift
Matt Bruce aa013f62e3 added equatable to structs
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2024-08-26 09:03:17 -05:00

34 lines
787 B
Swift

//
// TabModel.swift
// VDS
//
// Created by Matt Bruce on 5/22/23.
//
import Foundation
extension Tabs {
public struct TabModel: Equatable {
///Text that goes in the Tab
public var text: String
///Click event when you click on a tab
public var onClick: ((Int) -> Void)?
///Width of the tab
public var width: CGFloat?
public init(text: String, onClick: ((Int) -> Void)? = nil, width: CGFloat? = nil) {
self.text = text
self.onClick = onClick
self.width = width
}
public static func == (lhs: Tabs.TabModel, rhs: Tabs.TabModel) -> Bool {
lhs.text == rhs.text
&& lhs.width == rhs.width
}
}
}