-
Notifications
You must be signed in to change notification settings - Fork 0
Alert
Nariman Bortov edited this page Jul 2, 2023
·
3 revisions
import { Alert } from '@narimanb/wreactui'
There are five types of alerts, applied by the prop type: success
, danger
, warning
, info
and neutral
(default).
Every alert comes with an icon that helps identifying the type of alert for colorblind people.
Code
<Alert>Lorem ipsum dolor sit</Alert>
<Alert type="success">Lorem ipsum dolor sit</Alert>
<Alert type="danger">Lorem ipsum dolor sit</Alert>
<Alert type="warning">Lorem ipsum dolor sit</Alert>
<Alert type="info">Lorem ipsum dolor sit</Alert>
<Alert type="neutral">Lorem ipsum dolor sit</Alert>
The onClose
prop is responsible for showing the close button and executing the passed function.
Code
<Alert type="success" onClose={() => {}}>
Lorem ipsum
</Alert>
Prop | Description | Type | Default |
---|---|---|---|
type |
define the size of component |
success , danger , warning , info , neutral
|
neutral |
onClose |
if present, shows a close button and executes a function | function |
Original source: Estevan Maito https://windmillui.com/react-ui