Alert
Documentation for the <Alert />
component. Learn about the available props and how to use it.
Installation
To get started, install @exponentialeducation/betomic
via yarn
:
# Yarn
yarn add @exponentialeducation/betomic
Basic Example
An Alert
notify users of important information.
{/* ... */}
import { Alert } from "@exponentialeducation/betomic";
function IndexPage() { return ( <main> {/* ... */}
<Alert> Default alert example </Alert>
{/* ... */} </main> )}
Default alert example
Variants
You can change the default style, passing a valid type
prop:
{/* ... */}
import { Alert } from "@exponentialeducation/betomic";
function IndexPage() { return ( <main> {/* ... */}
<Alert type="success"> Success are to notify... </Alert>
{/* ... */} </main> )}
Success are to notify the user about a process that already happens with a successful result
This one is to warn something that something isn't running well at all and they have to take precaution to continue
Error is to notify when something it’s wrong and maybe critical to continue
Information alert is to notify this that something is happening and just want to maintain informed them
Closable
{/* ... */}
import { Alert } from "@exponentialeducation/betomic";
function IndexPage() { return ( <main> {/* ... */}
<Alert type="success" closable> Success are to notify... </Alert>
{/* ... */} </main> )}
Success are to notify the user about a process that already happens with a successful result
This one is to warn something that something isn't running well at all and they have to take precaution to continue
Error is to notify when something it’s wrong and maybe critical to continue
Information alert is to notify this that something is happening and just want to maintain informed them
Props
prop | description |
---|---|
bordered |
|
children |
|
closable? |
|
type? |
|