updated to include badge color changes to dependent components
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
8057b16e5b
commit
50117f3f2f
@ -468,6 +468,7 @@ open class Tilelet: TileContainerBase<Tilelet.Padding>, ParentViewProtocol {
|
||||
private func updateBadge() {
|
||||
if let badgeModel {
|
||||
badge.text = badgeModel.text
|
||||
badge.textColor = badgeModel.textColor
|
||||
badge.fillColor = badgeModel.fillColor
|
||||
badge.numberOfLines = badgeModel.numberOfLines
|
||||
badge.surface = backgroundColorSurface
|
||||
|
||||
@ -15,6 +15,9 @@ extension Tilelet {
|
||||
/// Text that will be used for the badge.
|
||||
public var text: String = ""
|
||||
|
||||
/// Text color that will be used for the badge.
|
||||
public var textColor: Badge.TextColor?
|
||||
|
||||
/// Fill color that will be used for the badge.
|
||||
public var fillColor: Badge.FillColor
|
||||
|
||||
@ -30,8 +33,9 @@ extension Tilelet {
|
||||
/// LineBreakMode used in Badge label.
|
||||
public var lineBreakMode: NSLineBreakMode
|
||||
|
||||
public init(text: String, fillColor: Badge.FillColor = .red, surface: Surface = .light, numberOfLines: Int = 0, maxWidth: CGFloat? = nil, lineBreakMode: NSLineBreakMode = .byTruncatingTail) {
|
||||
public init(text: String, textColor: Badge.TextColor? = nil, fillColor: Badge.FillColor = .red, surface: Surface = .light, numberOfLines: Int = 0, maxWidth: CGFloat? = nil, lineBreakMode: NSLineBreakMode = .byTruncatingTail) {
|
||||
self.text = text
|
||||
self.textColor = textColor
|
||||
self.fillColor = fillColor
|
||||
self.surface = surface
|
||||
self.numberOfLines = numberOfLines
|
||||
|
||||
Loading…
Reference in New Issue
Block a user