Merge branch 'feature/vds_batch_three' into 'develop'

VDS Batch Three

See merge request BPHV_MIPS/vds_ios!155
This commit is contained in:
Hedden, Kyle Matthew 2024-02-29 19:56:47 +00:00
commit ebbc2fe62d
3 changed files with 11 additions and 11 deletions

View File

@ -14,7 +14,7 @@ extension Tilelet {
// MARK: - Enums
//--------------------------------------------------
/// Enum used to describe the textStyle of the subTitle label.
public enum StandardStyle: String, EnumSubset {
public enum OtherStandardStyle: String, EnumSubset {
case bodyLarge
case bodyMedium
case bodySmall
@ -28,7 +28,7 @@ extension Tilelet {
public var text: String = ""
/// Text style that will be used for the subTitle label.
public var standardStyle: StandardStyle = .bodySmall
public var otherStandardStyle: OtherStandardStyle = .bodySmall
/// Text attributes that will be used for the subTitle label.
public var textAttributes: [any LabelAttributeModel]?
@ -40,13 +40,13 @@ extension Tilelet {
// MARK: - Initializers
//--------------------------------------------------
public init(text: String,
otherStandardStyle: OtherStandardStyle = .bodySmall,
textColor: Use = .primary,
textAttributes: [any LabelAttributeModel]? = nil,
standardStyle: StandardStyle = .bodySmall) {
textAttributes: [any LabelAttributeModel]? = nil) {
self.text = text
self.otherStandardStyle = otherStandardStyle
self.textAttributes = textAttributes
self.textColor = textColor
self.standardStyle = standardStyle
}
//--------------------------------------------------
@ -55,7 +55,7 @@ extension Tilelet {
/// Converts this type of model to a TitleLockup.SubTitleModel.
public func toTitleLockupSubTitleModel() -> TitleLockup.SubTitleModel {
TitleLockup.SubTitleModel(text: text,
standardStyle: standardStyle.value,
otherStandardStyle: otherStandardStyle.value,
textColor: textColor,
textAttributes: textAttributes)
}

View File

@ -45,7 +45,7 @@ open class TitleLockup: View {
//--------------------------------------------------
private var otherStandardStyle: OtherStandardStyle {
if let subTitleModel, !subTitleModel.text.isEmpty {
return subTitleModel.standardStyle
return subTitleModel.otherStandardStyle
} else if let eyebrowModel, !eyebrowModel.text.isEmpty {
return eyebrowModel.standardStyle
} else {

View File

@ -14,7 +14,7 @@ extension TitleLockup {
public var text: String
/// Standard style that will be used for the subTitle label.
public var standardStyle: OtherStandardStyle
public var otherStandardStyle: OtherStandardStyle
/// Text color used in the subtitle label.
public var textColor: Use
@ -26,19 +26,19 @@ extension TitleLockup {
public var numberOfLines: Int
public init(text: String,
standardStyle: OtherStandardStyle = .bodyLarge,
otherStandardStyle: OtherStandardStyle = .bodyLarge,
textColor: Use = .primary,
textAttributes: [any LabelAttributeModel]? = nil,
numberOfLines: Int = 0) {
self.text = text
self.standardStyle = standardStyle
self.otherStandardStyle = otherStandardStyle
self.textColor = textColor
self.textAttributes = textAttributes
self.numberOfLines = numberOfLines
}
/// TextStyle used to render the text.
public var textStyle: TextStyle { standardStyle.value.regular }
public var textStyle: TextStyle { otherStandardStyle.value.regular }
}