create new comp
This commit is contained in:
18
components/ErrorScreen.js
Normal file
18
components/ErrorScreen.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import styles from "./ErrorScreen.module.css";
|
||||
|
||||
const ErrorScreen = ({ onFocus, onChange, onKeyDown }) => {
|
||||
return (
|
||||
<div className={styles.wrapper}>
|
||||
<h1 className={styles.message}>City not found, try again!</h1>
|
||||
<input
|
||||
type="text"
|
||||
className={styles.input}
|
||||
onFocus={onFocus}
|
||||
onChange={onChange}
|
||||
onKeyDown={onKeyDown}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ErrorScreen;
|
||||
24
components/ErrorScreen.module.css
Normal file
24
components/ErrorScreen.module.css
Normal file
@@ -0,0 +1,24 @@
|
||||
.wrapper {
|
||||
max-width: 260px;
|
||||
text-align: center;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
.message {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.input {
|
||||
max-width: 100%;
|
||||
margin-bottom: 20px;
|
||||
height: 40px;
|
||||
border: none;
|
||||
padding: 0 10px;
|
||||
color: #303030;
|
||||
font-size: 20px;
|
||||
text-align: right;
|
||||
border-radius: 10px;
|
||||
font-family: "Varela Round", sans-serif;
|
||||
font-size: 18px;
|
||||
}
|
||||
11
components/LoadingScreen.js
Normal file
11
components/LoadingScreen.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import styles from "./LoadingScreen.module.css";
|
||||
|
||||
const LoadingScreen = () => {
|
||||
return (
|
||||
<div className={styles.wrapper}>
|
||||
<h1>Loading data...</h1>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default LoadingScreen;
|
||||
5
components/LoadingScreen.module.css
Normal file
5
components/LoadingScreen.module.css
Normal file
@@ -0,0 +1,5 @@
|
||||
.wrapper {
|
||||
max-width: 260px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
Reference in New Issue
Block a user