vds_ios/VDS/Components/TitleLockup/TitleLockupTitleModel.swift
Matt Bruce 98968bacbd refactored out top/bottom spacing config and created new one
updated models to use a StandardStyle
updated Tilelet/TitleLockup to use new features

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2023-06-29 12:06:28 -05:00

34 lines
991 B
Swift

//
// TitleLockupTitleModel.swift
// VDS
//
// Created by Matt Bruce on 1/6/23.
//
import Foundation
extension TitleLockup {
public struct TitleModel {
public var text: String
public var textAttributes: [any LabelAttributeModel]?
public var isBold: Bool
public var standardStyle: TitleStandardStyle
public var numberOfLines: Int
public init(text: String,
textAttributes: [any LabelAttributeModel]? = nil,
isBold: Bool = true,
standardStyle: TitleStandardStyle = .featureXSmall,
numberOfLines: Int = 0) {
self.text = text
self.isBold = isBold
self.textAttributes = textAttributes
self.standardStyle = standardStyle
self.numberOfLines = numberOfLines
}
public var textStyle: TextStyle { isBold ? standardStyle.value.bold : standardStyle.value.regular }
}
}