Moving components out of a folder UI
This commit is contained in:
23
src/components/Common/ModalLayout/ModalLayout.jsx
Normal file
23
src/components/Common/ModalLayout/ModalLayout.jsx
Normal file
@ -0,0 +1,23 @@
|
||||
import React from "react";
|
||||
|
||||
import "./modalLayout.scss";
|
||||
|
||||
export const ModalLayout = ({ active, setActive, children, styles }) => {
|
||||
return (
|
||||
<div
|
||||
className={active ? `modal-layout active` : "modal-layout"}
|
||||
onClick={() => setActive(false)}
|
||||
>
|
||||
<div
|
||||
className={
|
||||
styles ? `modal-layout__content ${styles}` : "modal-layout__content"
|
||||
}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ModalLayout;
|
28
src/components/Common/ModalLayout/modalLayout.scss
Normal file
28
src/components/Common/ModalLayout/modalLayout.scss
Normal file
@ -0,0 +1,28 @@
|
||||
.modal-layout {
|
||||
z-index: 9;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.11);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transform: scale(0);
|
||||
|
||||
&__content {
|
||||
position: relative;
|
||||
background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%);
|
||||
border-radius: 24px;
|
||||
padding: 60px 60px 30px 60px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-layout.active {
|
||||
transform: scale(1);
|
||||
}
|
Reference in New Issue
Block a user