Alert
Flexible Alert Component
The Alert component can be used by first import it from the library using the code below
The above code allows the Alert component to be used on that particular page. The Alert
component requires the message
or children
props to begin
The message
or children
property accepts a string
or node
containing the message to be displayed.
You are only required to use either the message or children prop.
Below are the other props the Alert
component can take.
Type Prop
The type
property accepts a string of predefined value of dark
, light
,info
, success
, warning
and danger
.
The default type value is info
The icon
property accepts an image which can be used as the header of the alert component.
Shadow Prop
The Shadow
accepts a boolean. It adds a shadow style to the Alert
component.
The Shadow
props adds a shadow that matches the color of the Type
prop.
onClose prop
Collapsible prop
Icon props
Last updated
Was this helpful?