-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add two new components: Spinner & Error
- Loading branch information
1 parent
a7fa1b6
commit f0e83a2
Showing
3 changed files
with
39 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from "react"; | ||
|
||
const Error = ({ message }) => ( | ||
<div class="alert alert-danger" role="alert"> | ||
<h4 class="alert-heading">Error</h4> | ||
{message} | ||
</div> | ||
); | ||
|
||
export default Error; |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.spinnerContainer { | ||
display: flex; | ||
justify-content: center; | ||
margin: 50px; | ||
} | ||
|
||
.spinner { | ||
border: 8px solid #f3f3f3; /* Light grey */ | ||
border-top: 8px solid #3498db; /* Blue */ | ||
border-radius: 50%; | ||
width: 60px; | ||
height: 60px; | ||
animation: spin 1s linear infinite; | ||
} | ||
|
||
@keyframes spin { | ||
0% { transform: rotate(0deg); } | ||
100% { transform: rotate(360deg); } | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from "react"; | ||
import "./Spinner.css"; | ||
|
||
const Spinner = () => ( | ||
<div className="spinnerContainer"> | ||
<div className="spinner" role="status" /> | ||
</div> | ||
); | ||
|
||
export default Spinner; |