vds_ios/VDS/Components/Tooltip/TooltipModel.swift
Matt Bruce 1dd626d766 refactored tooltip to use a model
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2023-09-13 17:38:04 -05:00

34 lines
1.0 KiB
Swift

//
// TooltipModel.swift
// VDS
//
// Created by Matt Bruce on 9/13/23.
//
import Foundation
import UIKit
extension Tooltip {
/// Model used to represent the tooltip.
public struct TooltipModel {
/// Current Surface and this is used to pass down to child objects that implement Surfacable
public var closeButtonText: String
public var title: String?
public var content: String?
public var contentView: UIView?
public var contentViewAlignment: UIStackView.Alignment?
public init(closeButtonText: String = "Close",
title: String? = nil,
content: String? = nil,
contentView: UIView? = nil,
contentViewAlignment: UIStackView.Alignment = .leading) {
self.closeButtonText = closeButtonText
self.title = title
self.content = content
self.contentView = contentView
self.contentViewAlignment = contentViewAlignment
}
}
}