-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚀 [QA] Update release environment (#657)
This is a pull request that upon merging will update production environment with recent `stage-live` changes. The environment that will be updated: * Production: https://taho-development.netlify.app/ (aka https://app.taho.xyz/) Read more: [Deployment to Production Flow](https://github.com/tahowallet/dapp/blob/main/docs/testing-env.md)
- Loading branch information
Showing
32 changed files
with
613 additions
and
331 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 was deleted.
Oops, something went wrong.
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,88 @@ | ||
import React, { ReactNode } from "react" | ||
import { animated } from "@react-spring/web" | ||
import { useVisibilityTransition } from "shared/hooks" | ||
import Icon from "shared/components/Icon" | ||
import closeIcon from "shared/assets/icons/s/close.svg" | ||
|
||
export type PopupProps = { | ||
children: ReactNode | ||
isVisible: boolean | ||
close: () => void | ||
leftPosition?: string | number | ||
bottomPosition: string | number | ||
rightPosition?: string | number | ||
width: string | number | ||
hasPointer?: boolean | ||
style?: React.CSSProperties | ||
} | ||
|
||
type XAxisPsition = { | ||
left?: string | number | ||
right?: string | number | ||
} | ||
|
||
export default function Popup({ | ||
children, | ||
isVisible, | ||
close, | ||
bottomPosition, | ||
leftPosition, | ||
rightPosition, | ||
width, | ||
hasPointer = true, | ||
style, | ||
}: PopupProps) { | ||
const transition = useVisibilityTransition(isVisible) | ||
const xPosition: XAxisPsition = {} | ||
|
||
if (leftPosition !== null) xPosition.left = leftPosition | ||
if (rightPosition !== null) xPosition.right = rightPosition | ||
|
||
return ( | ||
<> | ||
<animated.div | ||
style={{ | ||
position: "absolute", | ||
bottom: bottomPosition, | ||
background: "#043937", | ||
borderRadius: 16, | ||
padding: "24px 32px 32px", | ||
width, | ||
pointerEvents: isVisible ? "all" : "none", | ||
...transition, | ||
...xPosition, | ||
...style, | ||
}} | ||
> | ||
<button | ||
type="button" | ||
className="close_button button_reset" | ||
onClick={close} | ||
> | ||
<Icon src={closeIcon} width="16px" height="16px" /> | ||
</button> | ||
<div className="content">{children}</div> | ||
</animated.div> | ||
<style jsx>{` | ||
.close_button { | ||
position: absolute; | ||
top: 14px; | ||
right: 16px; | ||
padding: 0; | ||
} | ||
.content::after { | ||
display: ${hasPointer ? "block" : "none"}; | ||
content: ""; | ||
background: #043937; | ||
height: 12px; | ||
width: 12px; | ||
position: absolute; | ||
bottom: -4px; | ||
right: 26px; | ||
border-radius: 2px; | ||
rotate: 45deg; | ||
} | ||
`}</style> | ||
</> | ||
) | ||
} |
Oops, something went wrong.