39 lines
1.1 KiB
Swift
39 lines
1.1 KiB
Swift
//
|
|
// TiletTitleModel.swift
|
|
// VDS
|
|
//
|
|
// Created by Matt Bruce on 1/6/23.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct TiletTitleModel: Codable {
|
|
public enum TitleTypographicalStyle: String, EnumSubset, Codable {
|
|
case TitleXLarge
|
|
case BoldTitleXLarge
|
|
case TitleLarge
|
|
case BoldTitleLarge
|
|
case TitleMedium
|
|
case BoldTitleMedium
|
|
case TitleSmall
|
|
case BoldTitleSmall
|
|
|
|
public var defaultValue: TitleLockupTitleTypographicalStyle { .BoldTitleSmall }
|
|
}
|
|
|
|
public var text: String = ""
|
|
public var typographicalStyle: TitleTypographicalStyle = .BoldTitleSmall
|
|
|
|
public init(text: String,
|
|
typographicalStyle: TitleTypographicalStyle = .BoldTitleSmall) {
|
|
self.text = text
|
|
self.typographicalStyle = typographicalStyle
|
|
}
|
|
|
|
public func toTitleLockupTitleModel() -> TitleLockupTitleModel {
|
|
TitleLockupTitleModel(text: text,
|
|
textAttributes: nil,
|
|
typographicalStyle: typographicalStyle.value)
|
|
}
|
|
}
|