-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve example of Alert and remove info-dark type
- Loading branch information
Showing
2 changed files
with
35 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,40 @@ | ||
Info | ||
Default | ||
|
||
```js | ||
<Alert> | ||
Congrats! Your recovery code was printed and the app authenticator was | ||
sucessfully validated. | ||
</Alert> | ||
<div> | ||
<div className="mb5"> | ||
<Alert | ||
autoClose={3000} | ||
onClose={() => console.log("Auto closed after 3000ms!")} | ||
> | ||
Congrats! Your recovery code was printed and the app authenticator was | ||
sucessfully validated. | ||
</Alert> | ||
</div> | ||
</div> | ||
``` | ||
|
||
Warning | ||
Alerts | ||
|
||
```js | ||
<Alert type="warning" onClose={() => console.log("Closed!")}> | ||
This action is irreversible! | ||
</Alert> | ||
<div> | ||
<div className="mb5"> | ||
<Alert type="success" onClose={() => console.log("Closed!")}> | ||
Your action was complete! | ||
</Alert> | ||
</div> | ||
|
||
<div className="mb5"> | ||
<Alert type="warning" onClose={() => console.log("Closed!")}> | ||
This action is irreversible! | ||
</Alert> | ||
</div> | ||
|
||
<div> | ||
<Alert type="error" onClose={() => console.log("Closed!")}> | ||
You can't delete this item. | ||
</Alert> | ||
</div> | ||
</div> | ||
``` | ||
Error | ||
|
||
```js | ||
<Alert type="error" onClose={() => console.log("Closed!")}> | ||
You can't delete this item. | ||
</Alert> | ||
``` | ||
Success | ||
```js | ||
<Alert type="success" onClose={() => console.log("Closed!")}> | ||
Your action was complete! | ||
</Alert> | ||
``` | ||
Info Dark | ||
```js | ||
<Alert type="info-dark" onClose={() => console.log("Closed!")}> | ||
Congrats! Your recovery code was printed and the app authenticator was | ||
sucessfully validated. | ||
</Alert> | ||
``` | ||
Auto Close | ||
```js | ||
<Alert | ||
autoClose={3000} | ||
onClose={() => console.log("Auto closed after 3000ms!")} | ||
> | ||
Congrats! Your recovery code was printed and the app authenticator was | ||
sucessfully validated. | ||
</Alert> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters