forked from datahub-project/datahub
-
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.
fix: display demo form modal on mobile (datahub-project#11581)
- Loading branch information
1 parent
f43720e
commit 43c185d
Showing
7 changed files
with
135 additions
and
29 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
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,17 @@ | ||
import React, { useEffect } from 'react'; | ||
import styles from "./styles.module.scss"; | ||
import DemoForm from '../DemoForm'; | ||
|
||
const DemoFormModal = ({ formId, handleCloseModal }) => { | ||
|
||
return ( | ||
<div className={styles.modal}> | ||
<div className={styles.modalContent}> | ||
<button className={styles.closeButton} onClick={handleCloseModal}>✕</button> | ||
<DemoForm formId={formId} /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DemoFormModal; |
45 changes: 45 additions & 0 deletions
45
docs-website/src/pages/cloud/DemoFormModal/styles.module.scss
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,45 @@ | ||
|
||
.modal { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: rgba(0, 0, 0, 0.5); /* Modal background */ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
z-index: 1000; | ||
overflow-y: scroll; | ||
|
||
.modalContent { | ||
width: 90%; | ||
max-width: 540px; | ||
background: #fff; | ||
border-radius: 16px; | ||
position: relative; | ||
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1); | ||
animation: modalShow 0.3s ease-in-out; | ||
|
||
.closeButton { | ||
position: absolute; | ||
top: 1rem; | ||
right: 1rem; | ||
background: none; | ||
border: none; | ||
font-size: 1.5rem; | ||
cursor: pointer; | ||
} | ||
} | ||
} | ||
|
||
@keyframes modalShow { | ||
from { | ||
opacity: 0; | ||
transform: translateY(-20px); | ||
} | ||
to { | ||
opacity: 1; | ||
transform: translateY(0); | ||
} | ||
} |
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
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
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
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