refactored naming

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-08-30 14:18:23 -05:00
parent 67f3542e22
commit b6a759be70
4 changed files with 19 additions and 19 deletions

View File

@ -150,7 +150,7 @@ public class SurfacePickerSelectorView: PickerSelectorView<Surface>{
} }
} }
public class TextPositionPickerSelectorView: PickerSelectorView<TextPosition>{ public class TextPositionPickerSelectorView: PickerSelectorView<TextAlignment>{
init(picker: UIPickerView? = nil){ init(picker: UIPickerView? = nil){
super.init(title: "left", picker: picker, items: [.left, .right]) super.init(title: "left", picker: picker, items: [.left, .right])
} }

View File

@ -17,10 +17,10 @@ class LabelViewController: BaseViewController<Label> {
picker: self.picker) picker: self.picker)
}() }()
lazy var textPositionPickerSelectorView = { lazy var textAlignmentPickerSelectorView = {
PickerSelectorView(title: TextPosition.left.rawValue, PickerSelectorView(title: TextAlignment.left.rawValue,
picker: self.picker, picker: self.picker,
items: TextPosition.allCases) items: TextAlignment.allCases)
}() }()
lazy var fontCategoryPickerSelectorView = { lazy var fontCategoryPickerSelectorView = {
@ -154,7 +154,7 @@ class LabelViewController: BaseViewController<Label> {
scaledLineHeightRow = addFormRow(label: "Use Scaled LineHeight", view: useScaledLineHeight) scaledLineHeightRow = addFormRow(label: "Use Scaled LineHeight", view: useScaledLineHeight)
checkForScaledFonts() checkForScaledFonts()
addFormRow(label: "Text Position", view: textPositionPickerSelectorView) addFormRow(label: "Text Alignment", view: textAlignmentPickerSelectorView)
addFormRow(label: "Font Category", view: fontCategoryPickerSelectorView) addFormRow(label: "Font Category", view: fontCategoryPickerSelectorView)
addFormRow(label: "Text Size", view: textSizePickerSelectorView) addFormRow(label: "Text Size", view: textSizePickerSelectorView)
addFormRow(label: "Text", view: textField) addFormRow(label: "Text", view: textField)
@ -328,8 +328,8 @@ class LabelViewController: BaseViewController<Label> {
self?.contentTopView.backgroundColor = item.color self?.contentTopView.backgroundColor = item.color
} }
textPositionPickerSelectorView.onPickerDidSelect = { [weak self] item in textAlignmentPickerSelectorView.onPickerDidSelect = { [weak self] item in
self?.component.textPosition = item self?.component.textAlignment = item.value
} }
textSizePickerSelectorView.onPickerDidSelect = { [weak self] item in textSizePickerSelectorView.onPickerDidSelect = { [weak self] item in

View File

@ -12,10 +12,10 @@ import VDSColorTokens
class TitleLockupViewController: BaseViewController<TitleLockup> { class TitleLockupViewController: BaseViewController<TitleLockup> {
lazy var textPositionPickerSelectorView = { lazy var textAlignmentPickerSelectorView = {
PickerSelectorView(title: "left", PickerSelectorView(title: "left",
picker: self.picker, picker: self.picker,
items: TitleLockup.TextPosition.allCases) items: TitleLockup.TextAlignment.allCases)
}() }()
lazy var titleStandardStylePickerSelectorView = { lazy var titleStandardStylePickerSelectorView = {
@ -53,7 +53,7 @@ class TitleLockupViewController: BaseViewController<TitleLockup> {
override func setupForm(){ override func setupForm(){
super.setupForm() super.setupForm()
addFormRow(label: "Surface", view: surfacePickerSelectorView) addFormRow(label: "Surface", view: surfacePickerSelectorView)
addFormRow(label: "Text Position", view: textPositionPickerSelectorView) addFormRow(label: "Text Alignment", view: textAlignmentPickerSelectorView)
addFormRow(label: "Title is Bold", view: titleIsBold) addFormRow(label: "Title is Bold", view: titleIsBold)
addFormRow(label: "Eyebrow is Bold", view: eyebrowIsBold) addFormRow(label: "Eyebrow is Bold", view: eyebrowIsBold)
@ -105,7 +105,7 @@ class TitleLockupViewController: BaseViewController<TitleLockup> {
//setup UI //setup UI
surfacePickerSelectorView.text = component.surface.rawValue surfacePickerSelectorView.text = component.surface.rawValue
textPositionPickerSelectorView.text = component.textPosition.rawValue textAlignmentPickerSelectorView.text = TextAlignment.left.rawValue
otherStandardStylePickerSelectorView.text = subTitleModel.standardStyle.rawValue otherStandardStylePickerSelectorView.text = subTitleModel.standardStyle.rawValue
titleStandardStylePickerSelectorView.text = titleModel.standardStyle.rawValue titleStandardStylePickerSelectorView.text = titleModel.standardStyle.rawValue
subtitleColorPickerSelectorView.text = subTitleModel.textColor.rawValue subtitleColorPickerSelectorView.text = subTitleModel.textColor.rawValue
@ -166,8 +166,8 @@ class TitleLockupViewController: BaseViewController<TitleLockup> {
self?.contentTopView.backgroundColor = item.color self?.contentTopView.backgroundColor = item.color
} }
textPositionPickerSelectorView.onPickerDidSelect = { [weak self] item in textAlignmentPickerSelectorView.onPickerDidSelect = { [weak self] item in
self?.component.textPosition = item self?.component.textAlignment = item
} }
titleStandardStylePickerSelectorView.onPickerDidSelect = { [weak self] item in titleStandardStylePickerSelectorView.onPickerDidSelect = { [weak self] item in

View File

@ -22,10 +22,10 @@ class TrailingTooltipLabelViewController: BaseViewController<TrailingTooltipLabe
picker: self.picker) picker: self.picker)
}() }()
lazy var textPositionPickerSelectorView = { lazy var textAlignmentPickerSelectorView = {
PickerSelectorView(title: TextPosition.left.rawValue, PickerSelectorView(title: TextAlignment.left.rawValue,
picker: self.picker, picker: self.picker,
items: TextPosition.allCases) items: TextAlignment.allCases)
}() }()
var boldSwitch = Toggle() var boldSwitch = Toggle()
@ -51,7 +51,7 @@ class TrailingTooltipLabelViewController: BaseViewController<TrailingTooltipLabe
addFormRow(label: "Disabled", view: disabledSwitch) addFormRow(label: "Disabled", view: disabledSwitch)
addFormRow(label: "Bold", view: boldSwitch) addFormRow(label: "Bold", view: boldSwitch)
addFormRow(label: "Surface", view: surfacePickerSelectorView) addFormRow(label: "Surface", view: surfacePickerSelectorView)
addFormRow(label: "Text Position", view: textPositionPickerSelectorView) addFormRow(label: "Text Alignment", view: textAlignmentPickerSelectorView)
addFormRow(label: "Font Category", view: fontCategoryPickerSelectorView) addFormRow(label: "Font Category", view: fontCategoryPickerSelectorView)
addFormRow(label: "Text Size", view: textSizePickerSelectorView) addFormRow(label: "Text Size", view: textSizePickerSelectorView)
addFormRow(label: "Text", view: textField) addFormRow(label: "Text", view: textField)
@ -154,8 +154,8 @@ class TrailingTooltipLabelViewController: BaseViewController<TrailingTooltipLabe
self?.contentTopView.backgroundColor = item.color self?.contentTopView.backgroundColor = item.color
} }
textPositionPickerSelectorView.onPickerDidSelect = { [weak self] item in textAlignmentPickerSelectorView.onPickerDidSelect = { [weak self] item in
self?.component.labelTextPosition = item self?.component.labelTextAlignment = item
} }
textSizePickerSelectorView.onPickerDidSelect = { [weak self] item in textSizePickerSelectorView.onPickerDidSelect = { [weak self] item in