Components
Alert
Alert are to display a list of options on a temporary surface
Component Status Details
Status component contains a list of checks and completeness that has been tested and owned by each component
We don't use color as the only visual tool to convey information.
The component’s structure and properties include relevant options such as variant, style, size, orientation, optional iconography, decorations, selection, error state, etc. The title is the component name that uses the frame base component template. The base component name contains: .Base & "Component Name" if there is more than one. All component properties use the Legion foundation.
We can change all the parts that are connected to the component base. The inside of the base component remains connected to the master component. All variant options are not damaged when we change from one to another. Overriding changes to components will not reset other variants.
Component's already has component specs documentation.
The Alert component is utilized to present a temporary surface that provides a list of options. It displays a brief message or notification to the user within an existing activity.
Usage
To implement Alert, you can use this tag `LgnAlertButton` in the xml file.
var visible by remember {mutableStateOf(true)}LgnAlert(title = "Info Title",description = "Interactive monetize corporate alignment",action = {Text(text = "Call To Action")
Themes
There are 4 themes which are available :
Info
The following is properties value to implement Alert info
var visible by remember {mutableStateOf(true)}LgnAlertInfo(title = "Info Title",description = "Interactive monetize corporate alignment",action = {Text(text = "Call To Action")
Success
The following is properties value to implement Alert Success
.
var visible by remember {mutableStateOf(true)}LgnAlertSuccess(title = "Success Title",description = "Interactive monetize corporate alignment",action = {Text(text = "Call To Action")
Warning
The following is properties value to implement Alert Warning
.
var visible by remember {mutableStateOf(true)}LgnAlertWarning(title = "Warning Title",description = "Interactive monetize corporate alignment",action = {Text(text = "Call To Action")
Error
The following is properties value to implement Alert Error
.
var visible by remember {mutableStateOf(true)}LgnAlertError(title = "Error Title",description = "Interactive monetize corporate alignment",action = {Text(text = "Call To Action")
Attributes
Parameter | Type | Description |
---|---|---|
title | String | Set the title of Alert |
description | String | Set the description of Alert |
action | Composable | Set more component in Alert |
visible | Boolean | To show or hide an Alert |
showCloseIcon | Boolean | To display or remove the close icon |
onClose | Function | Action for close Alert |
icon | Composable | To set Custom Icon |
colors | LgnAlertColors | Set the color of the Alert By LgnAlertDefaults.infoColors() |
modifier | Modifier | [Modifier] to be applied to the alert |