Skip to content

Commit

Permalink
refactor(web): refactor-popup-container-to-separate-file
Browse files Browse the repository at this point in the history
  • Loading branch information
Harman-singh-waraich committed Apr 8, 2024
1 parent bd121e1 commit a9b93a9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
11 changes: 9 additions & 2 deletions web/src/layout/Header/DesktopHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import Menu from "./navbar/Menu";
import Help from "./navbar/Menu/Help";
import Settings from "./navbar/Menu/Settings";

import { PopupContainer } from ".";

const Container = styled.div`
display: none;
position: absolute;
Expand Down Expand Up @@ -79,6 +77,15 @@ const ConnectWalletContainer = styled.div`
}
`;

const PopupContainer = styled.div`
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 30;
`;

const DesktopHeader = () => {
const [isDappListOpen, toggleIsDappListOpen] = useToggle(false);
const [isHelpOpen, toggleIsHelpOpen] = useToggle(false);
Expand Down
9 changes: 0 additions & 9 deletions web/src/layout/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ const HeaderContainer = styled.div`
padding: 4px 24px 8px;
`;

export const PopupContainer = styled.div`
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 30;
`;

const Header: React.FC = () => {
return (
<Container>
Expand Down
10 changes: 9 additions & 1 deletion web/src/layout/Header/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import ConnectWallet from "components/ConnectWallet";
import LightButton from "components/LightButton";
import { Overlay } from "components/Overlay";

import { PopupContainer } from "..";
import { useOpenContext } from "../MobileHeader";

import DappList from "./DappList";
Expand Down Expand Up @@ -72,6 +71,15 @@ const DisconnectWalletButtonContainer = styled.div`
align-items: center;
`;

const PopupContainer = styled.div`
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 30;
`;

export interface ISettings {
toggleIsSettingsOpen: () => void;
}
Expand Down

0 comments on commit a9b93a9

Please sign in to comment.