-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common popup component is created and styled
Relates #36
- Loading branch information
1 parent
77bedab
commit c02c625
Showing
6 changed files
with
110 additions
and
3 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,4 +1,10 @@ | ||
import React from 'react'; | ||
import './style.css'; | ||
import PopUp from '../utils/PopUp/index'; | ||
|
||
export default () => <h1>Hello World</h1>; | ||
export default () => ( | ||
<div> | ||
<PopUp message="The waiter is coming" /> | ||
<h1>Hello World</h1> | ||
</div> | ||
); |
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,24 @@ | ||
import React from 'react'; | ||
import propTypes from 'prop-types'; | ||
import './style.css'; | ||
import img from '../../../assets/images/popupImg.png'; | ||
// import Button from '../../utils/Button/index'; | ||
|
||
function PopUp({ message }) { | ||
return ( | ||
<div className="popup-background"> | ||
<div className="popup"> | ||
<img src={img} alt="food" className="popup-img" /> | ||
<p className="popup-text"> {message} </p> | ||
<button type="submit" className="popup-button"> | ||
submit | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
PopUp.propTypes = { | ||
message: propTypes.string.isRequired, | ||
}; | ||
export default PopUp; |
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,62 @@ | ||
.popup{ | ||
position: absolute; | ||
text-align: center; | ||
width: 80%; | ||
height: 36%; | ||
right: 50%; | ||
top: 50%; | ||
transform: translate(50%, -50%); | ||
background:#FFFFFF; | ||
border-radius: 10px; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
|
||
} | ||
|
||
.popup-background{ | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
top: 0; | ||
left: 0; | ||
background: #564B4B; | ||
mix-blend-mode: multiply; | ||
} | ||
|
||
.popup-img{ | ||
position: absolute; | ||
text-align: center; | ||
display: flex; | ||
width: 100%; | ||
height: 40%; | ||
left: 0; | ||
top: -10%; | ||
mix-blend-mode: normal; | ||
} | ||
|
||
|
||
.popup-text{ | ||
position: absolute; | ||
right: 50%; | ||
top: 40%; | ||
transform: translate(50%, -50%); | ||
font-family: Roboto; | ||
font-style: normal; | ||
font-weight: normal; | ||
font-size: 30px; | ||
line-height: 25px; | ||
text-align: center; | ||
color: #000000; | ||
} | ||
|
||
.popup-button{ | ||
text-align: center; | ||
position: absolute; | ||
width: 33%; | ||
height: 15%; | ||
left: 50%; | ||
bottom: 20%; | ||
transform: translate(-50%, 50%); | ||
background: #ED6707; | ||
border-radius: 3px; | ||
} |