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
|
isAccessibilityElement = true
|
||||||
accessibilityTraits = .button
|
accessibilityTraits = .button
|
||||||
|
|
||||||
onClickSubscriber = publisher(for: .touchUpInside)
|
onClick = { [weak self] tooltip in
|
||||||
.sink(receiveValue: { [weak self] tooltip in
|
guard let self else { return}
|
||||||
guard let self else { return}
|
self.presentTooltip(surface: tooltip.surface,
|
||||||
self.presentTooltip(surface: tooltip.surface,
|
tooltipModel: .init(closeButtonText: tooltip.closeButtonText,
|
||||||
tooltipModel: .init(closeButtonText: tooltip.closeButtonText,
|
title: tooltip.title,
|
||||||
title: tooltip.title,
|
content: tooltip.content,
|
||||||
content: tooltip.content,
|
contentView: tooltip.contentView),
|
||||||
contentView: tooltip.contentView),
|
presenter: self)
|
||||||
presenter: self)
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resets to default settings.
|
/// Resets to default settings.
|
||||||
|
|||||||
@ -22,7 +22,8 @@ extension Clickable {
|
|||||||
set {
|
set {
|
||||||
if let newValue {
|
if let newValue {
|
||||||
onClickSubscriber = publisher(for: .touchUpInside)
|
onClickSubscriber = publisher(for: .touchUpInside)
|
||||||
.sink { c in
|
.sink { [weak self] c in
|
||||||
|
guard let self, self.isEnabled else { return }
|
||||||
newValue(c)
|
newValue(c)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user