Alert
The <Alert />
component provides feedback to the user that something has happened.
It has the attribute role="alert"
, which means that when the component is rendered its content will also be read aloud to users with screen readers.
The Alert component includes predefined status codes and customizable colors and icons.
import { Alert } from 'minerva-ui';
If status codes are supplied, the component will supply predefined colors and icons.
Whoa!
Something not great is happening.Congrats!
Something great is happening!Something is happening that isn't bad yet, but might be soon.Attention:
Something is happening and you should know about it.
Closeable Alert
You can supply a prop of canBeClosed
to allow an Alert to display and hide.
Custom Colors / Icons
You can also supply your own colors and icons. The default theme includes Feather Icons.
Alert!!!
Here is some information.
Props
Name | Type | Is Required | Default | Description |
---|---|---|---|---|
status | 'error', 'success', 'warning', 'info' | optional | none | If status codes are supplied, the component will supply predefined colors and icons. |
title | string | optional | none | Title for Alert |
bg | string | optional | #e5e7eb | Sets the background color of the alert. Will override status |
icon | string | optional | none | Icon for Alert |