updated controllers
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
68d2a5173e
commit
b9cdc0dc4b
@ -17,6 +17,12 @@ class LabelViewController: BaseViewController {
|
||||
picker: self.picker)
|
||||
}()
|
||||
|
||||
lazy var textPositionPickerSelectorView = {
|
||||
PickerSelectorView(title: TextPosition.left.rawValue,
|
||||
picker: self.picker,
|
||||
items: TextPosition.allCases)
|
||||
}()
|
||||
|
||||
lazy var fontCategoryPickerSelectorView = {
|
||||
FontCategoryPickerSelectorView(title: "",
|
||||
picker: self.picker)
|
||||
@ -44,6 +50,7 @@ class LabelViewController: BaseViewController {
|
||||
addFormRow(label: "Disabled", view: .makeWrapper(for: disabledSwitch))
|
||||
addFormRow(label: "Bold", view: .makeWrapper(for: boldSwitch))
|
||||
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
||||
addFormRow(label: "Text Position", view: textPositionPickerSelectorView)
|
||||
addFormRow(label: "Font Category", view: fontCategoryPickerSelectorView)
|
||||
addFormRow(label: "Text Size", view: textSizePickerSelectorView)
|
||||
addFormRow(label: "Text", view: textField)
|
||||
@ -65,7 +72,7 @@ class LabelViewController: BaseViewController {
|
||||
self?.label.text = text
|
||||
}.store(in: &subscribers)
|
||||
}
|
||||
|
||||
|
||||
func setupModel() {
|
||||
label.text = "Label Component"
|
||||
label.textStyle = .featureSmall
|
||||
@ -116,6 +123,10 @@ class LabelViewController: BaseViewController {
|
||||
self?.label.surface = item
|
||||
self?.contentTopView.backgroundColor = item.color
|
||||
}
|
||||
|
||||
textPositionPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||
self?.label.textPosition = item
|
||||
}
|
||||
|
||||
textSizePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||
self?.textSize = item
|
||||
|
||||
@ -27,6 +27,12 @@ class TrailingTooltipLabelViewController: BaseViewController {
|
||||
picker: self.picker,
|
||||
items: Tooltip.Size.allCases)
|
||||
}()
|
||||
|
||||
lazy var textPositionPickerSelectorView = {
|
||||
PickerSelectorView(title: TextPosition.left.rawValue,
|
||||
picker: self.picker,
|
||||
items: TextPosition.allCases)
|
||||
}()
|
||||
|
||||
var boldSwitch = Toggle()
|
||||
var disabledSwitch = Toggle()
|
||||
@ -55,6 +61,7 @@ class TrailingTooltipLabelViewController: BaseViewController {
|
||||
addFormRow(label: "Disabled", view: .makeWrapper(for: disabledSwitch))
|
||||
addFormRow(label: "Bold", view: .makeWrapper(for: boldSwitch))
|
||||
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
||||
addFormRow(label: "Text Position", view: textPositionPickerSelectorView)
|
||||
addFormRow(label: "Font Category", view: fontCategoryPickerSelectorView)
|
||||
addFormRow(label: "Text Size", view: textSizePickerSelectorView)
|
||||
addFormRow(label: "Text", view: textField)
|
||||
@ -162,10 +169,14 @@ class TrailingTooltipLabelViewController: BaseViewController {
|
||||
self?.contentTopView.backgroundColor = item.color
|
||||
}
|
||||
|
||||
textPositionPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||
self?.tooltipLabel.labelTextPosition = item
|
||||
}
|
||||
|
||||
textSizePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||
self?.textSize = item
|
||||
}
|
||||
|
||||
|
||||
fontCategoryPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||
self?.fontCategory = item
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user