updated buttonbase
other buttons Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
aa233515a5
commit
ac8d4e707b
@ -17,7 +17,7 @@ public enum ButtonSize: String, CaseIterable {
|
||||
}
|
||||
|
||||
@objc(VDSButton)
|
||||
open class Button: ButtonBase, Useable {
|
||||
open class Button: ButtonBase, Useable, Clickable {
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Private Properties
|
||||
@ -30,6 +30,8 @@ open class Button: ButtonBase, Useable {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
open var onClick: ((Button) -> ())? { didSet { setupOnClick() } }
|
||||
|
||||
open override var availableSizes: [ButtonSize] { [.large, .small] }
|
||||
|
||||
open var use: Use = .primary { didSet { didChange() }}
|
||||
|
||||
@ -29,7 +29,7 @@ open class ButtonBase: UIButton, Buttonable, Handlerable, ViewProtocol, Resettab
|
||||
//--------------------------------------------------
|
||||
public var subject = PassthroughSubject<Void, Never>()
|
||||
public var subscribers = Set<AnyCancellable>()
|
||||
open var onClickSubscriber: AnyCancellable? {
|
||||
internal var onClickSubscriber: AnyCancellable? {
|
||||
willSet {
|
||||
if let onClickSubscriber {
|
||||
onClickSubscriber.cancel()
|
||||
|
||||
@ -12,7 +12,7 @@ import VDSFormControlsTokens
|
||||
import Combine
|
||||
|
||||
@objc(VDSTextLink)
|
||||
open class TextLink: ButtonBase {
|
||||
open class TextLink: ButtonBase, Clickable {
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Private Properties
|
||||
@ -22,6 +22,8 @@ open class TextLink: ButtonBase {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
open var onClick: ((TextLink) -> ())? { didSet { setupOnClick() } }
|
||||
|
||||
open var size: ButtonSize = .large { didSet { didChange() }}
|
||||
|
||||
open override var availableSizes: [ButtonSize] { [.large, .small] }
|
||||
|
||||
@ -12,7 +12,7 @@ import VDSFormControlsTokens
|
||||
import Combine
|
||||
|
||||
@objc(VDSTextLinkCaret)
|
||||
open class TextLinkCaret: ButtonBase {
|
||||
open class TextLinkCaret: ButtonBase, Clickable {
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Enums
|
||||
@ -24,6 +24,8 @@ open class TextLinkCaret: ButtonBase {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Private Properties
|
||||
//--------------------------------------------------
|
||||
open var onClick: ((TextLinkCaret) -> ())? { didSet { setupOnClick() } }
|
||||
|
||||
open override var textStyle: TextStyle {
|
||||
TextStyle.boldBodyLarge
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user