Merge branch 'feature/tilet' into 'develop'
refactored structs into parent See merge request BPHV_MIPS/vds_ios!31
This commit is contained in:
commit
fdc1af7d3a
@ -171,13 +171,13 @@ open class Tilet: TileContainer {
|
|||||||
open var textPostion: TextPosition = .top { didSet { didChange() }}
|
open var textPostion: TextPosition = .top { didSet { didChange() }}
|
||||||
|
|
||||||
//models
|
//models
|
||||||
public var badgeModel: TiletBadgeModel? { didSet { didChange() }}
|
public var badgeModel: BadgeModel? { didSet { didChange() }}
|
||||||
public var titleModel: TiletTitleModel? { didSet { didChange() }}
|
public var titleModel: TitleModel? { didSet { didChange() }}
|
||||||
public var subTitleModel: TiletSubTitleModel? { didSet { didChange() }}
|
public var subTitleModel: SubTitleModel? { didSet { didChange() }}
|
||||||
|
|
||||||
//only 1 Icon can be active
|
//only 1 Icon can be active
|
||||||
private var _descriptiveIconModel: TiletDescriptiveIcon?
|
private var _descriptiveIconModel: DescriptiveIcon?
|
||||||
public var descriptiveIconModel: TiletDescriptiveIcon? {
|
public var descriptiveIconModel: DescriptiveIcon? {
|
||||||
get { _descriptiveIconModel }
|
get { _descriptiveIconModel }
|
||||||
set {
|
set {
|
||||||
_descriptiveIconModel = newValue;
|
_descriptiveIconModel = newValue;
|
||||||
@ -186,8 +186,8 @@ open class Tilet: TileContainer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var _directionalIconModel: TiletDirectionalIcon?
|
private var _directionalIconModel: DirectionalIcon?
|
||||||
public var directionalIconModel: TiletDirectionalIcon? {
|
public var directionalIconModel: DirectionalIcon? {
|
||||||
get { _directionalIconModel }
|
get { _directionalIconModel }
|
||||||
set {
|
set {
|
||||||
_directionalIconModel = newValue;
|
_directionalIconModel = newValue;
|
||||||
|
|||||||
@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct TiletBadgeModel: Codable {
|
extension Tilet {
|
||||||
|
public struct BadgeModel: Codable {
|
||||||
public var text: String = ""
|
public var text: String = ""
|
||||||
public var fillColor:Badge.FillColor
|
public var fillColor:Badge.FillColor
|
||||||
public var surface: Surface
|
public var surface: Surface
|
||||||
@ -21,3 +22,4 @@ public struct TiletBadgeModel: Codable {
|
|||||||
self.maxWidth = maxWidth
|
self.maxWidth = maxWidth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -8,7 +8,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
public struct TiletDescriptiveIcon: Codable {
|
extension Tilet {
|
||||||
|
|
||||||
|
public struct DescriptiveIcon: Codable {
|
||||||
public var name: Icon.Name = .multipleDocuments
|
public var name: Icon.Name = .multipleDocuments
|
||||||
public var size: Icon.Size = .medium
|
public var size: Icon.Size = .medium
|
||||||
public var surface: Surface = .dark
|
public var surface: Surface = .dark
|
||||||
@ -20,7 +22,7 @@ public struct TiletDescriptiveIcon: Codable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct TiletDirectionalIcon: Codable {
|
public struct DirectionalIcon: Codable {
|
||||||
public var size: Icon.Size = .medium
|
public var size: Icon.Size = .medium
|
||||||
public var surface: Surface = .dark
|
public var surface: Surface = .dark
|
||||||
|
|
||||||
@ -29,3 +31,4 @@ public struct TiletDirectionalIcon: Codable {
|
|||||||
self.surface = surface
|
self.surface = surface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct TiletSubTitleModel: Codable {
|
extension Tilet {
|
||||||
|
public struct SubTitleModel: Codable {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Enums
|
// MARK: - Enums
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -50,3 +51,4 @@ public struct TiletSubTitleModel: Codable {
|
|||||||
textAttributes: nil)
|
textAttributes: nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct TiletTitleModel: Codable {
|
extension Tilet {
|
||||||
|
public struct TitleModel: Codable {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Enums
|
// MARK: - Enums
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -48,3 +49,4 @@ public struct TiletTitleModel: Codable {
|
|||||||
textStyle: textStyle.value)
|
textStyle: textStyle.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user