An alert is an element that displays a brief, important message in a way that attracts the user's attention without interrupting the user's task —WAI-ARIA-Practices-1.1
This is a very simple component and applies role="alert" to whatever element
you decide to spread props on.
🚨 Here is some important info for you 📣
<Alert> {({ getProps }) => ( <div {getProps()}> <p>🚨 Here is some important info for you 📣</p> </div> )}</Alert>function({}) | required
This is the only required prop. children is our render prop and must be a
function. It is called with an object argument:
| property | type | description |
|---|---|---|
getProps | function(props: object) | returns the props for the alert element (e.g., a div) |