more comments

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-08-28 12:01:42 -05:00
parent 2b1234afc8
commit 7fc4d1b2b2
6 changed files with 34 additions and 5 deletions

View File

@ -11,7 +11,11 @@ import VDSColorTokens
import VDSFormControlsTokens
import Combine
/// Badges are visual labels used to convey status or highlight supplemental information.
/// A badge is a visual label used to convey status or highlight supplemental information.
///
/// If you are using AutoLayoutConstraints you have a combination of Leading/Left and Trailing/Right NSLayoutConstraints,
/// you need to ensure that one of these Horizontal Contraints is not constraint of "equatTo". If you are to pin the left/right edges
/// to its parent this object will stretch to the parent's width.
@objc(VDSBadge)
open class Badge: View {
//--------------------------------------------------

View File

@ -12,7 +12,7 @@ import VDSFormControlsTokens
import Combine
import VDSTypographyTokens
/// Badge Indicators are visual labels .
/// A badge indicator is a visual label used to convey status or highlight supplemental information.
@objc(VDSBadgeIndicator)
open class BadgeIndicator: View {
//--------------------------------------------------

View File

@ -16,6 +16,11 @@ public enum ButtonSize: String, CaseIterable {
case small
}
/// A button is an interactive element that triggers an action. Buttons are prominent and attention-getting, with more visual emphasis than any of the Text Link components. For this reason, buttons are best suited for critical and driving actions. This class can be used within a ``ButtonGroup``.
///
/// If you are using AutoLayoutConstraints you have a combination of Leading/Left and Trailing/Right NSLayoutConstraints,
/// you need to ensure that one of these Horizontal Contraints is not constraint of "equatTo". If you are to pin the left/right edges
/// to its parent this object will stretch to the parent's width.
@objc(VDSButton)
open class Button: ButtonBase, Useable {
@ -27,13 +32,18 @@ open class Button: ButtonBase, Useable {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
/// The ButtonSize available to this type of Buttonable.
open override var availableSizes: [ButtonSize] { [.large, .small] }
open var use: Use = .primary { didSet { setNeedsUpdate() }}
/// The ButtonSize for ths Button.
open var size: ButtonSize = .large { didSet { setNeedsUpdate() }}
/// The Use for this Button.
open var use: Use = .primary { didSet { setNeedsUpdate() }}
private var _width: CGFloat? = nil
/// If there is a width that is larger than this size's minmumWidth, the button will resize to this width.
open var width: CGFloat? {
get { _width }
set {

View File

@ -11,6 +11,7 @@ import VDSColorTokens
import VDSFormControlsTokens
import Combine
/// A button group contains combinations of related CTAs including ``Button``, ``TextLink``, and ``TextLinkCaret``. This group component controls a combination's orientation, spacing, size and allowable size pairings.
@objc(VDSButtonGroup)
open class ButtonGroup: View, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, UICollectionViewDelegate, ButtongGroupPositionLayoutDelegate {

View File

@ -11,6 +11,12 @@ import VDSColorTokens
import VDSFormControlsTokens
import Combine
/// A text link is an interactive element that navigates a customer to pages within an experience, like a Bill details page, or triggers a secondary action,
/// like canceling a task. This class can be used within a ``ButtonGroup``.
///
/// If you are using AutoLayoutConstraints you have a combination of Leading/Left and Trailing/Right NSLayoutConstraints,
/// you need to ensure that one of these Horizontal Contraints is not constraint of "equatTo". If you are to pin the left/right edges
/// to its parent this object will stretch to the parent's width.
@objc(VDSTextLink)
open class TextLink: ButtonBase {
@ -27,7 +33,8 @@ open class TextLink: ButtonBase {
// MARK: - Properties
//--------------------------------------------------
open var size: ButtonSize = .large { didSet { setNeedsUpdate() }}
/// The ButtonSize available to this type of Buttonable.
open override var availableSizes: [ButtonSize] { [.large, .small] }
open override var textStyle: TextStyle {

View File

@ -11,6 +11,12 @@ import VDSColorTokens
import VDSFormControlsTokens
import Combine
/// A text link caret is an interactive element that always brings a customer to another page. It's used for navigation,
/// like "Back", or a call-to-action for a product or feature, like "Shop smartphones". This class can be used within a ``ButtonGroup``.
///
/// If you are using AutoLayoutConstraints you have a combination of Leading/Left and Trailing/Right NSLayoutConstraints,
/// you need to ensure that one of these Horizontal Contraints is not constraint of "equatTo". If you are to pin the left/right edges
/// to its parent this object will stretch to the parent's width.
@objc(VDSTextLinkCaret)
open class TextLinkCaret: ButtonBase {
@ -38,6 +44,7 @@ open class TextLinkCaret: ButtonBase {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
/// The ButtonSize available to this type of Buttonable.
public override var availableSizes: [ButtonSize] { [.large] }
open var iconPosition: IconPosition = .right { didSet { setNeedsUpdate() } }