vds_ios/VDS/Components/TitleLockup/TitleLockupSubTitleModel.swift
Matt Bruce c0236a433c documentation
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2023-08-30 10:08:28 -05:00

46 lines
1.4 KiB
Swift

//
// TitleLockupSubTitleModel.swift
// VDS
//
// Created by Matt Bruce on 1/6/23.
//
import Foundation
extension TitleLockup {
/// Model that represents the options available for the sub title label.
public struct SubTitleModel {
/// Text that will be used for the subTitle label.
public var text: String
/// Standard style that will be used for the subTitle label.
public var standardStyle: OtherStandardStyle
/// Text color used in the subtitle label.
public var textColor: Use
/// Array of LabelAttributeModel objects used in rendering the text in the subtitle label.
public var textAttributes: [any LabelAttributeModel]?
/// Number of lines used in the subtitle label.
public var numberOfLines: Int
public init(text: String,
standardStyle: OtherStandardStyle = .bodyLarge,
textColor: Use = .primary,
textAttributes: [any LabelAttributeModel]? = nil,
numberOfLines: Int = 0) {
self.text = text
self.standardStyle = standardStyle
self.textColor = textColor
self.textAttributes = textAttributes
self.numberOfLines = numberOfLines
}
/// TextStyle used to render the text.
public var textStyle: TextStyle { standardStyle.value.regular }
}
}