Alert

alert

An inline message that does not interrupt user actions. Messages can be used to notify the user about something special: danger, success, information, or warning.

Usage

alert

XelaAlert(
    title: "Congratulations!",
    text: "Your OS has been updated to the latest version. Current OS Version 4.3.17863.289"
)
.frame(height:100) // height for Alert
.shadow(color: Color(.black).opacity(0.04), radius: 48, x:0 , y: 4) // shadow for Alert
.shadow(color: Color(.black).opacity(0.04), radius: 12, x:0 , y: 8) // shadow for Alert
.padding() // padding for Alert

Properties

Name Type Default Value Required Description
title String - YES Title for alert, may be empty for hide
text String - YES Text - caption for alert, may be empty for hide
leftIcon String NO Left Icon name from Assets
rightIcon String NO Right Icon name from Assets
primaryColor Color Color(xelaColor: .Blue6) NO Primary (Accent) color for Alert
secondaryColor Color Color(xelaColor: .Gray7) NO Secondary color for Alert
background Color Color(.white) NO Background for Alert
rightIconColor Color Color(xelaColor: .Gray6) NO Right Icon Color for Alert