Digital ACT-191 ONEAPP-10586 story: updated symbolType to use as String, and camelCase applied to footnoteItems
This commit is contained in:
parent
5541498dc1
commit
7343b670e9
@ -54,10 +54,10 @@ class FootnoteGroupViewController: BaseViewController<FootnoteGroup> {
|
||||
|
||||
func setupModel() {
|
||||
let toolTipModel = Tooltip.TooltipModel.init(title: "Check your item.", content:"Here is the content for your item.")
|
||||
footnotes.append(Footnote().with { $0.text = "Offer you best deals on phones, tablets, home, internet and more. Pre order the new version mobiles and get off *T&C apply."; $0.symbolType = .asterisk; $0.kind = .primary; $0.tooltipModel = toolTipModel})
|
||||
footnotes.append(Footnote().with { $0.text = "The display has rounded corners. When measured as a standard rectangular shape, the screen is 6.68 inches diagonally. Actual viewable area is less."; $0.symbolType = .doubleAsterisk; $0.kind = .primary})
|
||||
footnotes.append(Footnote().with { $0.text = " Some features may not be available for all countries or all areas."; $0.symbolType = .character; $0.kind = .primary})
|
||||
component.footnoteitems = footnotes
|
||||
footnotes.append(Footnote().with { $0.text = "Offer you best deals on phones, tablets, home, internet and more. Pre order the new version mobiles and get off *T&C apply."; $0.symbolType = "*"; $0.kind = .primary; $0.tooltipModel = toolTipModel})
|
||||
footnotes.append(Footnote().with { $0.text = "The display has rounded corners. When measured as a standard rectangular shape, the screen is 6.68 inches diagonally. Actual viewable area is less."; $0.symbolType = "**"; $0.kind = .primary})
|
||||
footnotes.append(Footnote().with { $0.text = " Some features may not be available for all countries or all areas."; $0.symbolType = "1."; $0.kind = .primary})
|
||||
component.footnoteItems = footnotes
|
||||
}
|
||||
|
||||
func setupPicker() {
|
||||
|
||||
@ -11,6 +11,26 @@ import VDS
|
||||
|
||||
class FootnoteViewController: BaseViewController<Footnote> {
|
||||
|
||||
internal enum SymbolType: String, DefaultValuing, CaseIterable {
|
||||
case asterisk
|
||||
case doubleAsterisk
|
||||
case character
|
||||
|
||||
public static var defaultValue: Self { .asterisk }
|
||||
|
||||
/// TextStyle relative to Size.
|
||||
public var text: String {
|
||||
switch self {
|
||||
case .asterisk:
|
||||
return "*"
|
||||
case .doubleAsterisk:
|
||||
return "**"
|
||||
case .character:
|
||||
return "1."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lazy var kindPickerSelectorView = {
|
||||
PickerSelectorView(title: "secondary",
|
||||
picker: self.picker,
|
||||
@ -20,7 +40,7 @@ class FootnoteViewController: BaseViewController<Footnote> {
|
||||
lazy var symbolTypePickerSelectorView = {
|
||||
PickerSelectorView(title: "asterisk",
|
||||
picker: self.picker,
|
||||
items: Footnote.SymbolType.allCases)
|
||||
items: SymbolType.allCases)
|
||||
}()
|
||||
|
||||
lazy var sizePickerSelectorView = {
|
||||
@ -84,7 +104,7 @@ class FootnoteViewController: BaseViewController<Footnote> {
|
||||
|
||||
sizePickerSelectorView.text = component.size.rawValue
|
||||
kindPickerSelectorView.text = component.kind.rawValue
|
||||
symbolTypePickerSelectorView.text = component.symbolType.rawValue
|
||||
symbolTypePickerSelectorView.text = SymbolType.defaultValue.text
|
||||
}
|
||||
|
||||
func setupPicker() {
|
||||
@ -102,7 +122,7 @@ class FootnoteViewController: BaseViewController<Footnote> {
|
||||
}
|
||||
|
||||
symbolTypePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||
self?.component.symbolType = item
|
||||
self?.component.symbolType = item.text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user