Merge branch 'feature/tilet' into 'develop'

refactored structs into parent

See merge request BPHV_MIPS/vds_ios!31
This commit is contained in:
Bruce, Matt R 2023-01-13 20:35:31 +00:00
commit fdc1af7d3a
5 changed files with 124 additions and 115 deletions

View File

@ -171,13 +171,13 @@ open class Tilet: TileContainer {
open var textPostion: TextPosition = .top { didSet { didChange() }}
//models
public var badgeModel: TiletBadgeModel? { didSet { didChange() }}
public var titleModel: TiletTitleModel? { didSet { didChange() }}
public var subTitleModel: TiletSubTitleModel? { didSet { didChange() }}
public var badgeModel: BadgeModel? { didSet { didChange() }}
public var titleModel: TitleModel? { didSet { didChange() }}
public var subTitleModel: SubTitleModel? { didSet { didChange() }}
//only 1 Icon can be active
private var _descriptiveIconModel: TiletDescriptiveIcon?
public var descriptiveIconModel: TiletDescriptiveIcon? {
private var _descriptiveIconModel: DescriptiveIcon?
public var descriptiveIconModel: DescriptiveIcon? {
get { _descriptiveIconModel }
set {
_descriptiveIconModel = newValue;
@ -186,8 +186,8 @@ open class Tilet: TileContainer {
}
}
private var _directionalIconModel: TiletDirectionalIcon?
public var directionalIconModel: TiletDirectionalIcon? {
private var _directionalIconModel: DirectionalIcon?
public var directionalIconModel: DirectionalIcon? {
get { _directionalIconModel }
set {
_directionalIconModel = newValue;

View File

@ -7,7 +7,8 @@
import Foundation
public struct TiletBadgeModel: Codable {
extension Tilet {
public struct BadgeModel: Codable {
public var text: String = ""
public var fillColor:Badge.FillColor
public var surface: Surface
@ -20,4 +21,5 @@ public struct TiletBadgeModel: Codable {
self.numberOfLines = numberOfLines
self.maxWidth = maxWidth
}
}
}

View File

@ -8,7 +8,9 @@
import Foundation
import UIKit
public struct TiletDescriptiveIcon: Codable {
extension Tilet {
public struct DescriptiveIcon: Codable {
public var name: Icon.Name = .multipleDocuments
public var size: Icon.Size = .medium
public var surface: Surface = .dark
@ -18,9 +20,9 @@ public struct TiletDescriptiveIcon: Codable {
self.size = size
self.surface = surface
}
}
}
public struct TiletDirectionalIcon: Codable {
public struct DirectionalIcon: Codable {
public var size: Icon.Size = .medium
public var surface: Surface = .dark
@ -28,4 +30,5 @@ public struct TiletDirectionalIcon: Codable {
self.size = size
self.surface = surface
}
}
}

View File

@ -7,7 +7,8 @@
import Foundation
public struct TiletSubTitleModel: Codable {
extension Tilet {
public struct SubTitleModel: Codable {
//--------------------------------------------------
// MARK: - Enums
//--------------------------------------------------
@ -49,4 +50,5 @@ public struct TiletSubTitleModel: Codable {
textColor: textColor,
textAttributes: nil)
}
}
}

View File

@ -7,7 +7,8 @@
import Foundation
public struct TiletTitleModel: Codable {
extension Tilet {
public struct TitleModel: Codable {
//--------------------------------------------------
// MARK: - Enums
//--------------------------------------------------
@ -47,4 +48,5 @@ public struct TiletTitleModel: Codable {
textAttributes: nil,
textStyle: textStyle.value)
}
}
}