ONEAPP-4828 - [Accessibility] Toggle
ONEAPP-4684 - [Accessibility] Tooltip Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
d2648489f0
commit
913cffe24e
@ -130,16 +130,15 @@ open class Tooltip: Control, TooltipLaunchable {
|
||||
isAccessibilityElement = true
|
||||
accessibilityTraits = .button
|
||||
|
||||
onClickSubscriber = publisher(for: .touchUpInside)
|
||||
.sink(receiveValue: { [weak self] tooltip in
|
||||
guard let self else { return}
|
||||
self.presentTooltip(surface: tooltip.surface,
|
||||
tooltipModel: .init(closeButtonText: tooltip.closeButtonText,
|
||||
title: tooltip.title,
|
||||
content: tooltip.content,
|
||||
contentView: tooltip.contentView),
|
||||
presenter: self)
|
||||
})
|
||||
onClick = { [weak self] tooltip in
|
||||
guard let self else { return}
|
||||
self.presentTooltip(surface: tooltip.surface,
|
||||
tooltipModel: .init(closeButtonText: tooltip.closeButtonText,
|
||||
title: tooltip.title,
|
||||
content: tooltip.content,
|
||||
contentView: tooltip.contentView),
|
||||
presenter: self)
|
||||
}
|
||||
}
|
||||
|
||||
/// Resets to default settings.
|
||||
|
||||
@ -22,7 +22,8 @@ extension Clickable {
|
||||
set {
|
||||
if let newValue {
|
||||
onClickSubscriber = publisher(for: .touchUpInside)
|
||||
.sink { c in
|
||||
.sink { [weak self] c in
|
||||
guard let self, self.isEnabled else { return }
|
||||
newValue(c)
|
||||
}
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user