32 lines
844 B
Swift
32 lines
844 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
|
|
|
|
public var enabled: Bool
|
|
|
|
/// The Breadcrumb link to links to its respective page.
|
|
public var selected: Bool
|
|
|
|
///Click event when you click on a breadcrumb item
|
|
public var onClick: ((BreadcrumbItem) -> Void)?
|
|
|
|
public init(text: String, enabeled: Bool = true, selected: Bool = false, onClick: ((BreadcrumbItem) -> Void)? = nil) {
|
|
self.text = text
|
|
self.enabled = enabeled
|
|
self.selected = selected
|
|
self.onClick = onClick
|
|
}
|
|
}
|
|
}
|