diff --git a/VDS/Components/Label/Label.swift b/VDS/Components/Label/Label.swift index 5c93cfdb..d85c0dd2 100644 --- a/VDS/Components/Label/Label.swift +++ b/VDS/Components/Label/Label.swift @@ -23,21 +23,36 @@ open class LabelBase: UILabel, ModelHandlerabl //-------------------------------------------------- // MARK: - Properties //-------------------------------------------------- + @Proxy(\.model.attributes) + open var attributes: [LabelAttributeModel]? + + @Proxy(\.model.fontCategory) + open var fontCategory: FontCategory + @Proxy(\.model.fontSize) - public var fontSize: FontSize - - @Proxy(\.model.textPosition) - public var textPosition: TextPosition + open var fontSize: FontSize @Proxy(\.model.fontWeight) - public var fontWeight: FontWeight - - @Proxy(\.model.fontCategory) - public var fontCategory: FontCategory + open var fontWeight: FontWeight + + @Proxy(\.model.textPosition) + open var textPosition: TextPosition @Proxy(\.model.surface) - public var surface: Surface + open var surface: Surface + + @Proxy(\.model.disabled) + open var disabled: Bool + //can't use @Proxy here + override open var text: String? { + didSet { + if model.text != oldValue { + model.text = text + } + } + } + //-------------------------------------------------- // MARK: - Initializers //--------------------------------------------------