vds_ios/VDS/Components/Tilelet/TileletBadgeModel.swift
Matt Bruce c0236a433c documentation
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2023-08-30 10:08:28 -05:00

38 lines
1.1 KiB
Swift

//
// TiletBadgeModel.swift
// VDS
//
// Created by Matt Bruce on 1/6/23.
//
import Foundation
extension Tilelet {
/// Model that represents the options available for the badge.
public struct BadgeModel {
/// Text that will be used for the badge.
public var text: String = ""
/// Fill color that will be used for the badge.
public var fillColor: Badge.FillColor
/// Current Surface and this is used to pass down to child objects that implement Surfacable
public var surface: Surface
/// Number of lines that will be used for the badge.
public var numberOfLines: Int
/// Max width that will be used for the badge.
public var maxWidth: CGFloat?
public init(text: String, fillColor: Badge.FillColor = .red, surface: Surface = .light, numberOfLines: Int = 0, maxWidth: CGFloat? = nil) {
self.text = text
self.fillColor = fillColor
self.surface = surface
self.numberOfLines = numberOfLines
self.maxWidth = maxWidth
}
}
}