re-arranged the inputs and added eyebrow is bold
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
70b7d327df
commit
4adee45f62
@ -187,13 +187,14 @@ class TileletViewController: BaseViewController<Tilelet> {
|
|||||||
var showDescriptionIconSwitch = Toggle()
|
var showDescriptionIconSwitch = Toggle()
|
||||||
var showDirectionalIconSwitch = Toggle()
|
var showDirectionalIconSwitch = Toggle()
|
||||||
var badgeTextField = TextField()
|
var badgeTextField = TextField()
|
||||||
|
var eyebrowIsBold = Toggle().with { $0.isOn = true }
|
||||||
var titleIsBold = Toggle().with { $0.isOn = true }
|
var titleIsBold = Toggle().with { $0.isOn = true }
|
||||||
var colorPickerType: ColorPickerType = .backgroundColor
|
var colorPickerType: ColorPickerType = .backgroundColor
|
||||||
var selectedGradient1Color: String?
|
var selectedGradient1Color: String?
|
||||||
var selectedGradient2Color: String?
|
var selectedGradient2Color: String?
|
||||||
var selectedGradientColorView: UIView?
|
var selectedGradientColorView: UIView?
|
||||||
var showDropShadowSwitch = Toggle()
|
var showDropShadowSwitch = Toggle()
|
||||||
var backgroundColor: BackgroundColor = .secondary
|
var backgroundColor: BackgroundColor = .black
|
||||||
var maxWidthTextField = NumericField()
|
var maxWidthTextField = NumericField()
|
||||||
|
|
||||||
var gradientColorsFormStackView = FormSection().with { $0.isHidden = true }
|
var gradientColorsFormStackView = FormSection().with { $0.isHidden = true }
|
||||||
@ -211,16 +212,9 @@ class TileletViewController: BaseViewController<Tilelet> {
|
|||||||
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
||||||
addActionRow()
|
addActionRow()
|
||||||
addFormRow(label: "Clickable", view: clickableSwitch)
|
addFormRow(label: "Clickable", view: clickableSwitch)
|
||||||
|
|
||||||
addFormRow(label: "Title Style", view: titleStandardStylePickerSelectorView)
|
addFormRow(label: "Aspect Ratio", view: scalingTypePickerSelectorView)
|
||||||
addFormRow(label: "Other Style", view: otherStandardStylePickerSelectorView)
|
|
||||||
addFormRow(label: "Padding", view: paddingPickerSelectorView)
|
addFormRow(label: "Padding", view: paddingPickerSelectorView)
|
||||||
|
|
||||||
addFormRow(label: "Eyebrow Text", view: eyebrowTextField)
|
|
||||||
addFormRow(label: "Title Text", view: titleTextField)
|
|
||||||
addFormRow(label: "Title is Bold", view: titleIsBold)
|
|
||||||
addFormRow(label: "Subtitle Color", view: subtitleColorPickerSelectorView)
|
|
||||||
addFormRow(label: "Subtitle Text", view: subTitleTextField)
|
|
||||||
addFormRow(label: "Width", view: widthTextField)
|
addFormRow(label: "Width", view: widthTextField)
|
||||||
addFormRow(label: "Height", view: heightTextField)
|
addFormRow(label: "Height", view: heightTextField)
|
||||||
addFormRow(label: "Text Alignment", view: textAlignmentPickerSelectorView)
|
addFormRow(label: "Text Alignment", view: textAlignmentPickerSelectorView)
|
||||||
@ -229,11 +223,23 @@ class TileletViewController: BaseViewController<Tilelet> {
|
|||||||
addFormRow(label: "Text Position(Minimum height is configurable.)", view: textPositionPickerSelectorView)
|
addFormRow(label: "Text Position(Minimum height is configurable.)", view: textPositionPickerSelectorView)
|
||||||
addFormRow(label: "Description Icon", view: showDescriptionIconSwitch)
|
addFormRow(label: "Description Icon", view: showDescriptionIconSwitch)
|
||||||
addFormRow(label: "Directional Icon", view: showDirectionalIconSwitch)
|
addFormRow(label: "Directional Icon", view: showDirectionalIconSwitch)
|
||||||
|
|
||||||
addFormRow(label: "Badge Text", view: badgeTextField)
|
addFormRow(label: "Badge Text", view: badgeTextField)
|
||||||
addFormRow(label: "Badge Fill Color", view: badgeFillColorPickerSelectorView)
|
addFormRow(label: "Badge Fill Color", view: badgeFillColorPickerSelectorView)
|
||||||
addFormRow(label: "Badge Number of Lines", view: badgeNumberOfLinesPickerSelectorView)
|
addFormRow(label: "Badge Number of Lines", view: badgeNumberOfLinesPickerSelectorView)
|
||||||
addFormRow(label: "Badge Max Width", view: maxWidthTextField)
|
addFormRow(label: "Badge Max Width", view: maxWidthTextField)
|
||||||
addFormRow(label: "Aspect Ratio", view: scalingTypePickerSelectorView)
|
|
||||||
|
addFormRow(label: "Eyebrow/Subtitle Style", view: otherStandardStylePickerSelectorView)
|
||||||
|
addFormRow(label: "Eyebrow Text", view: eyebrowTextField)
|
||||||
|
addFormRow(label: "Eyebrow is Bold", view: eyebrowIsBold)
|
||||||
|
|
||||||
|
addFormRow(label: "Title Style", view: titleStandardStylePickerSelectorView)
|
||||||
|
addFormRow(label: "Title Text", view: titleTextField)
|
||||||
|
addFormRow(label: "Title is Bold", view: titleIsBold)
|
||||||
|
|
||||||
|
addFormRow(label: "Subtitle Color", view: subtitleColorPickerSelectorView)
|
||||||
|
addFormRow(label: "Subtitle Text", view: subTitleTextField)
|
||||||
|
|
||||||
addFormRow(label: "Background Color", view: backgroundColorPickerSelectorView)
|
addFormRow(label: "Background Color", view: backgroundColorPickerSelectorView)
|
||||||
addFormRow(label: "Background Image", view: showBackgroundImageSwitch)
|
addFormRow(label: "Background Image", view: showBackgroundImageSwitch)
|
||||||
addFormRow(label: "Show Drop Shadow", view: showDropShadowSwitch)
|
addFormRow(label: "Show Drop Shadow", view: showDropShadowSwitch)
|
||||||
@ -330,7 +336,11 @@ class TileletViewController: BaseViewController<Tilelet> {
|
|||||||
self?.component.directionalIconModel = nil
|
self?.component.directionalIconModel = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eyebrowIsBold.publisher(for: .valueChanged).sink { [weak self] toggle in
|
||||||
|
self?.setEyebrowModel()
|
||||||
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
titleIsBold.publisher(for: .valueChanged).sink { [weak self] toggle in
|
titleIsBold.publisher(for: .valueChanged).sink { [weak self] toggle in
|
||||||
self?.setTitleModel()
|
self?.setTitleModel()
|
||||||
}.store(in: &subscribers)
|
}.store(in: &subscribers)
|
||||||
@ -420,7 +430,7 @@ class TileletViewController: BaseViewController<Tilelet> {
|
|||||||
|
|
||||||
func setEyebrowModel() {
|
func setEyebrowModel() {
|
||||||
if let text = eyebrowTextField.text, !text.isEmpty {
|
if let text = eyebrowTextField.text, !text.isEmpty {
|
||||||
component.eyebrowModel = Tilelet.EyebrowModel(text: text, standardStyle: otherStandardStylePickerSelectorView.selectedItem)
|
component.eyebrowModel = Tilelet.EyebrowModel(text: text, isBold: eyebrowIsBold.isOn, standardStyle: otherStandardStylePickerSelectorView.selectedItem)
|
||||||
} else {
|
} else {
|
||||||
component.eyebrowModel = nil
|
component.eyebrowModel = nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user