Setting surface parameter to buttons
This commit is contained in:
parent
684a343b0f
commit
cc3d65bd0b
@ -107,7 +107,7 @@ public class Notification: View {
|
|||||||
open var primaryButtonModel: ButtonModel? { didSet{didChange()}}
|
open var primaryButtonModel: ButtonModel? { didSet{didChange()}}
|
||||||
open var primaryButton = Button().with {
|
open var primaryButton = Button().with {
|
||||||
$0.size = .small
|
$0.size = .small
|
||||||
$0.use = .primary
|
$0.use = .secondary
|
||||||
}
|
}
|
||||||
|
|
||||||
open var secondaryButtonModel: ButtonModel? { didSet{didChange()}}
|
open var secondaryButtonModel: ButtonModel? { didSet{didChange()}}
|
||||||
@ -229,6 +229,7 @@ public class Notification: View {
|
|||||||
var buttons: [Button] = []
|
var buttons: [Button] = []
|
||||||
if let primaryButtonModel {
|
if let primaryButtonModel {
|
||||||
primaryButton.text = primaryButtonModel.text
|
primaryButton.text = primaryButtonModel.text
|
||||||
|
primaryButton.surface = surface
|
||||||
primaryButton.onClickSubscriber = primaryButton
|
primaryButton.onClickSubscriber = primaryButton
|
||||||
.publisher(for: .touchUpInside)
|
.publisher(for: .touchUpInside)
|
||||||
.sink(receiveValue: { button in
|
.sink(receiveValue: { button in
|
||||||
@ -239,6 +240,7 @@ public class Notification: View {
|
|||||||
|
|
||||||
if let secondaryButtonModel {
|
if let secondaryButtonModel {
|
||||||
secondaryButton.text = secondaryButtonModel.text
|
secondaryButton.text = secondaryButtonModel.text
|
||||||
|
secondaryButton.surface = surface
|
||||||
secondaryButton.onClickSubscriber = secondaryButton
|
secondaryButton.onClickSubscriber = secondaryButton
|
||||||
.publisher(for: .touchUpInside)
|
.publisher(for: .touchUpInside)
|
||||||
.sink(receiveValue: { button in
|
.sink(receiveValue: { button in
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user