-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] v1 UI for custom copyright (#418)
Added custom copyright
- Loading branch information
1 parent
c4218c9
commit 30fdc7c
Showing
24 changed files
with
989 additions
and
44 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// InfoModal.tsx | ||
import React, { useEffect } from 'react'; | ||
import styles from '@style' | ||
|
||
interface InfoModalProps { | ||
isOpen: boolean; | ||
title: string; | ||
content: string; | ||
onClose: () => void; // Function to toggle visibility | ||
} | ||
|
||
export const InfoModal: React.FC<InfoModalProps> = ({ isOpen, title, content, onClose }) => { | ||
useEffect(() => { | ||
const handleOutsideClick = (event: MouseEvent) => { | ||
if (event.target === document.getElementById('modal-overlay')) { | ||
onClose(); | ||
} | ||
}; | ||
|
||
document.addEventListener('mousedown', handleOutsideClick); | ||
return () => document.removeEventListener('mousedown', handleOutsideClick); | ||
}, [onClose]); | ||
|
||
if (!isOpen) return null; | ||
|
||
return ( | ||
<div id="modal-overlay" className={styles.modalOverlay}> | ||
<div className={styles.modalContent}> | ||
<h2>{title}</h2> | ||
<div>{content}</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default InfoModal; |
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,39 @@ | ||
@import '@styles/variables.scss'; | ||
@import '@styles/layout.scss'; | ||
|
||
.modalOverlay { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background-color: rgba(0, 0, 0, 0.382); | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
z-index: 99; | ||
overflow-y: auto; | ||
} | ||
|
||
.modalContent { | ||
background-color: var(--background-color); | ||
padding: 20px; | ||
box-shadow: 1px 1px var(--text-color); | ||
width: 80%; | ||
max-width: 61.8%; | ||
height: auto; | ||
max-height: 61.8vh; | ||
overflow: auto; | ||
margin-top: 0 auto; | ||
} | ||
|
||
.modalContent div { | ||
margin: 1em 0; | ||
} | ||
|
||
.modalContent p { | ||
margin-top: 1em; | ||
} | ||
.modalContent li { | ||
margin-top: 1em; | ||
} |
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 @@ | ||
export { InfoModal } from './InfoModal' |
Oops, something went wrong.