PrimaryButton

public struct PrimaryButton : Equatable

Describes the appearance of the primary button (e.g., the “Pay” button)

  • Creates a PaymentSheet.Appearance.PrimaryButton with default values

    Declaration

    Swift

    public init()
  • The background color of the primary button

    Note

    If nil, appearance.colors.primary will be used as the primary button background color

    Declaration

    Swift

    public var backgroundColor: UIColor?
  • The text color of the primary button

    Note

    If nil, defaults to either white or black depending on the color of the button

    Declaration

    Swift

    public var textColor: UIColor?
  • The corner radius of the primary button

    Note

    If nil, appearance.cornerRadius will be used as the primary button corner radius

    Note

    The behavior of this property is consistent with the behavior of corner radius on CALayer

    Declaration

    Swift

    public var cornerRadius: CGFloat?
  • The border color of the primary button

    Note

    The behavior of this property is consistent with the behavior of border color on CALayer

    Declaration

    Swift

    public var borderColor: UIColor
  • The border width of the primary button

    Note

    The behavior of this property is consistent with the behavior of border width on CALayer

    Declaration

    Swift

    public var borderWidth: CGFloat
  • The font used for the text of the primary button

    Note

    If nil, appearance.font.base will be used as the primary button font

    Note

    appearance.font.sizeScaleFactor does not impact the size of this font

    Declaration

    Swift

    public var font: UIFont?
  • The shadow of the primary button

    Note

    If nil, appearance.shadow will be used as the primary button shadow

    Declaration

    Swift

    public var shadow: Shadow?