PrimaryButton
public struct PrimaryButton : Equatable
Describes the appearance of the primary button (e.g., the “Pay” button)
-
Creates a
PaymentSheet.Appearance.PrimaryButton
with default valuesDeclaration
Swift
public init()
-
The background color of the primary button
Note
Ifnil
,appearance.colors.primary
will be used as the primary button background colorDeclaration
Swift
public var backgroundColor: UIColor?
-
The text color of the primary button
Note
Ifnil
, defaults to either white or black depending on the color of the buttonDeclaration
Swift
public var textColor: UIColor?
-
The corner radius of the primary button
Note
Ifnil
,appearance.cornerRadius
will be used as the primary button corner radiusNote
The behavior of this property is consistent with the behavior of corner radius onCALayer
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 onCALayer
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 onCALayer
Declaration
Swift
public var borderWidth: CGFloat
-
The font used for the text of the primary button
Note
Ifnil
,appearance.font.base
will be used as the primary button fontNote
appearance.font.sizeScaleFactor
does not impact the size of this fontDeclaration
Swift
public var font: UIFont?
-
The shadow of the primary button
Note
Ifnil
,appearance.shadow
will be used as the primary button shadowDeclaration
Swift
public var shadow: Shadow?