Digital ACT-191 ONEAPP-10928 story: removed disabled
This commit is contained in:
parent
5aefd665ed
commit
1503310f42
@ -13,7 +13,6 @@ import Combine
|
|||||||
|
|
||||||
class ModalViewController: BaseViewController<Modal> {
|
class ModalViewController: BaseViewController<Modal> {
|
||||||
|
|
||||||
var disabledSwitch = Toggle()
|
|
||||||
var showFooterSwitch = Toggle()
|
var showFooterSwitch = Toggle()
|
||||||
var fullScreenDialogSwitch = Toggle()
|
var fullScreenDialogSwitch = Toggle()
|
||||||
var singleButtonSwitch = Toggle()
|
var singleButtonSwitch = Toggle()
|
||||||
@ -38,7 +37,6 @@ class ModalViewController: BaseViewController<Modal> {
|
|||||||
|
|
||||||
override func setupForm(){
|
override func setupForm(){
|
||||||
super.setupForm()
|
super.setupForm()
|
||||||
addFormRow(label: "Disabled", view: disabledSwitch, pinTrailing: false)
|
|
||||||
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
||||||
addFormRow(label: "Show Modal Footer", view: showFooterSwitch, pinTrailing: false)
|
addFormRow(label: "Show Modal Footer", view: showFooterSwitch, pinTrailing: false)
|
||||||
addFormRow(label: "Full Screen Dialog", view: fullScreenDialogSwitch, pinTrailing: false)
|
addFormRow(label: "Full Screen Dialog", view: fullScreenDialogSwitch, pinTrailing: false)
|
||||||
@ -53,8 +51,8 @@ class ModalViewController: BaseViewController<Modal> {
|
|||||||
addFormRow(label: "Max Height", view: heightTextField)
|
addFormRow(label: "Max Height", view: heightTextField)
|
||||||
addFormRow(label: "Max Width", view: widthTextField)
|
addFormRow(label: "Max Width", view: widthTextField)
|
||||||
|
|
||||||
disabledSwitch.onChange = { [weak self] sender in
|
fullScreenDialogSwitch.onChange = { [weak self] sender in
|
||||||
self?.component.isEnabled = !sender.isOn
|
self?.component.fullScreenDialog = !sender.isOn
|
||||||
}
|
}
|
||||||
|
|
||||||
titleTextField
|
titleTextField
|
||||||
@ -78,7 +76,6 @@ class ModalViewController: BaseViewController<Modal> {
|
|||||||
|
|
||||||
//setup UI
|
//setup UI
|
||||||
surfacePickerSelectorView.text = component.surface.rawValue
|
surfacePickerSelectorView.text = component.surface.rawValue
|
||||||
disabledSwitch.isOn = !component.isEnabled
|
|
||||||
titleTextField.text = component.title
|
titleTextField.text = component.title
|
||||||
bodyTextField.text = component.content
|
bodyTextField.text = component.content
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user