AllButtonColors

public struct AllButtonColors : Equatable

AllButtonColors encapsulates the color configuration for all states of the allow button

To customize button colors:

  1. Define a new instance of the AllButtonColors struct
  2. Add the setAllowButtonColor(to colors:AllButtonColors) modifier to your view
  3. Pass in the AllButtonColors struct previously into the proper parameter

Creating New Button Configs

  • Declaration

    Swift

    public init(buttonIdle: ButtonColor, buttonAllowed: ButtonColor, buttonDenied: ButtonColor)

    Parameters

    buttonIdle

    The button color configuration for the default, idle state

    buttonAllowed

    The button color configuration for the highlighted, allowed state

    buttonDenied

    The button color configuration for the user explicitly denied state

  • Declaration

    Swift

    public init(buttonIdle: ButtonColor)

    Parameters

    buttonIdle

    The button color configuration for the default, idle state

  • Declaration

    Swift

    public init(buttonAllowed: ButtonColor)

    Parameters

    buttonAllowed

    The button color configuration for the highlighted, allowed state

  • Declaration

    Swift

    public init(buttonDenied: ButtonColor)

    Parameters

    buttonDenied

    The button color configuration for the user explicitly denied state

  • Initializes a new AllbuttonColors from the primary and tertiary colors

    Both primaryColor and tertiaryColor are non-required parameters. Colors without a given initializer parameter will be displayed with the default color.

    Declaration

    Swift

    public init(primaryColor: Color? = nil, tertiaryColor: Color? = nil)

    Parameters

    primaryColor

    The primary color, characterized by the default blue

    tertiaryColor

    The tertiary color, characterized by the default alert red

Button Color States