BPKBannerAlert

public struct BPKBannerAlert : View

A view that displays an icon and a non-editable text.

  • Creates a BPKBannerAlert.

    Declaration

    Swift

    public init(
        type: AlertType,
        style: Style = .default,
        message: String,
        icon: (icon: BPKIcon, accessibilityLabel: String)? = nil
    )

    Parameters

    type

    Controls which default icon to display in the banner.

    style

    Style of the alert (default, onContrast). It controls the alert background color.

    message

    The text to display in BPKText.

    icon

    Custom icon to use in the banner instead of the one associated with the AlertType.

  • Declaration

    Swift

    public var body: some View { get }
  • The style of the banner, which controls its background color

    See more

    Declaration

    Swift

    public enum Style
  • The type of the banner, which controls the default icon to display and its color.

    See more

    Declaration

    Swift

    public enum AlertType