34 lines
1.0 KiB
Swift
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
|
|
}
|
|
}
|
|
}
|