Sai-UI

Alert

It displays short important message in such a way that it does not disturbs user's current task.

Usage

It can be directly used in your component. Example :

Variants

Alert component has 4 variants : "success", "error", "warning", "info"

Props

Props for Alert components are:

NameTypeDescription
openBooleanTo control visibility of the Alert
closeAlertfunctionA function which closes the alert component. It is madatory to be passed.
typeStringIt specifies the typpe of the alert to be rendered. It has four options: "success", "error", "info", "warning"
durationnumberIt specifies the duration of time after which alert will disappear. By default its value is taken as 2000ms i.e, 2 seconds
customStylesObjectThey are used for styling the component they will override the current styles
iconStylesObjectIt is used for styling the icon of the alert.
customIconElementIt is used for passing your custom icon in the alert. It will replace the default icon.