vds_ios/VDS/Components/Breadcrumbs/BreadcrumbItemModel.swift

33 lines
894 B
Swift

//
// BreadcrumbItemModel.swift
// VDS
//
// Created by Kanamarlapudi, Vasavi on 20/03/24.
//
import Foundation
extension Breadcrumbs {
public struct BreadcrumbItemModel {
///Text that goes in the breadcrumb item
public var text: String
/// The Breadcrumb link to links to its respective page.
public var link: String
/// The Breadcrumb link to links to its respective page.
public var isSelected: Bool?
///Click event when you click on a breadcrumb item
public var onClick: ((BreadcrumbItem) -> Void)?
public init(text: String, link: String, isSelected: Bool? = false, onClick: ((BreadcrumbItem) -> Void)? = nil) {
self.text = text
self.isSelected = isSelected
self.onClick = onClick
self.link = link
}
}
}