File: /var/www/fintechfuel/src/components/ModalForm/ModalForm.svelte
<script lang="ts">
import close from '../../assets/images/close.svg';
import { showForm } from '../../store.js';
import Form from '../Form/Form.svelte';
</script>
<div class="modal">
<div
class="modalClose"
on:click={() => {
showForm.set(false);
}}
on:keydown={() => false}
role="button"
tabindex="0"
>
<img src={close} alt="" />
</div>
<div class="modalContent">
<Form />
</div>
</div>
<style lang="scss">
@import '../../scss/media';
.modal {
background: #f0ede8;
position: fixed;
z-index: 200;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100vw;
height: 100vh;
.modalClose {
height: 44px;
width: 44px;
position: absolute;
top: 20px;
right: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-radius: 100%;
border: 1px solid #d9d7cc;
background: #faf9f8;
@include breakpoint-down('mobM') {
right: 16px;
top: 16px;
}
&:hover {
background: #f0ede8;
border: 1px solid #f0ede8;
}
&:active {
background: #d9d7cc;
border: 1px solid #d9d7cc;
}
}
.modalContent {
width: 100%;
max-width: 912px;
margin-inline: auto;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
@include breakpoint-down('deskS') {
max-width: 832px;
}
@include breakpoint-down('tabS') {
overflow: auto;
padding: 0 57px 87px;
margin-top: 104px;
align-items: flex-start;
height: calc(100vh - 104px);
}
@include breakpoint-down('mobM') {
padding: 0 24px 70px 24px;
margin-top: 80px;
height: calc(100vh - 80px);
}
}
}
:global(.modalContent .form) {
padding: 0 !important;
background: transparent;
@include breakpoint-down('mobM') {
position: unset !important;
width: 100% !important;
}
}
</style>