vds_ios/VDS/Components/Tilet/TiletSubTitleModel.swift
Matt Bruce 0f8a564bc5 added defaults
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2023-01-12 15:58:27 -06:00

41 lines
1.2 KiB
Swift

//
// TiletSubTitleModel.swift
// VDS
//
// Created by Matt Bruce on 1/6/23.
//
import Foundation
public struct TiletSubTitleModel: Codable {
public enum SubTitleTypographicalStyle: String, Codable, EnumSubset {
case BodyLarge
case BoldBodyLarge
case BodyMedium
case BoldBodyMedium
case BodySmall
case BoldBodySmall
public var defaultValue: TitleLockupOtherTypographicalStyle { .BodySmall }
}
public var text: String = ""
public var typographicalStyle: SubTitleTypographicalStyle = .BodySmall
public var textColor: Use = .primary
public init(text: String,
textColor: Use = .primary,
textAttributes: [any LabelAttributeModel]? = nil,
typographicalStyle: SubTitleTypographicalStyle = .BodySmall) {
self.text = text
self.textColor = textColor
self.typographicalStyle = typographicalStyle
}
public func toTitleLockupSubTitleModel() -> TitleLockupSubTitleModel {
TitleLockupSubTitleModel(text: text,
textColor: textColor,
textAttributes: nil)
}
}