-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/XLabs/wormscan-ui into s…
…taging
- Loading branch information
Showing
45 changed files
with
12,797 additions
and
4,232 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@xlabs:registry=https://npm.pkg.github.com |
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,2 +1,12 @@ | ||
yarnPath: .yarn/releases/yarn-3.5.0.cjs | ||
nodeLinker: node-modules | ||
nodeLinker: node-modules | ||
|
||
npmRegistries: | ||
"https://npm.pkg.github.com": | ||
npmAlwaysAuth: true | ||
npmAuthToken: "${NODE_AUTH_TOKEN}" | ||
|
||
npmScopes: | ||
xlabs: | ||
npmAlwaysAuth: true | ||
npmRegistryServer: "https://npm.pkg.github.com" |
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,32 @@ | ||
import { ReactNode } from "react"; | ||
import { CrossIcon } from "src/icons/generic"; | ||
import "./styles.scss"; | ||
|
||
interface ModalProps { | ||
shouldShow: boolean; | ||
setShouldShow: (shouldShow: boolean) => void; | ||
children: ReactNode; | ||
} | ||
|
||
const Modal = ({ shouldShow, setShouldShow, children }: ModalProps) => { | ||
if (!shouldShow) return null; | ||
|
||
const handleOverlayClick = (e: React.MouseEvent) => { | ||
if (e.target === e.currentTarget) { | ||
setShouldShow(false); | ||
} | ||
}; | ||
|
||
return ( | ||
<div className={"modal_overlay"} onClick={handleOverlayClick}> | ||
<div className={"modal_content"}> | ||
{children} | ||
<button className={"modal_close"} onClick={() => setShouldShow(false)}> | ||
<CrossIcon /> | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Modal; |
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,61 @@ | ||
@use "src/styles/globals.scss" as *; | ||
|
||
.modal { | ||
&_overlay { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
background-color: rgba(0, 0, 0, 0.7); | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
z-index: 1000; | ||
} | ||
|
||
&_content { | ||
position: fixed; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
max-width: 100%; | ||
border-radius: 12px 12px 0 0; | ||
box-shadow: 0 -5px 20px var(--color-gray-900); | ||
background-color: var(--color-gray-900); | ||
padding: 30px; | ||
|
||
@include desktop { | ||
box-shadow: 20px 20px 40px var(--color-gray-900); | ||
border-radius: 12px; | ||
max-width: 720px; | ||
width: 100%; | ||
text-align: center; | ||
position: relative; | ||
padding: 0; | ||
} | ||
} | ||
|
||
&_close { | ||
@include centered-row; | ||
justify-content: center; | ||
|
||
position: absolute; | ||
top: 10px; | ||
right: 10px; | ||
border: 0px; | ||
border-radius: 50%; | ||
|
||
width: 24px; | ||
height: 24px; | ||
|
||
color: var(--color-white); | ||
background-color: var(--color-white-10); | ||
font-size: 14px; | ||
cursor: pointer; | ||
|
||
&:hover { | ||
background-color: var(--color-white-20); | ||
} | ||
} | ||
} |
Oops, something went wrong.