-
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.
- Loading branch information
1 parent
640b2ef
commit 9484568
Showing
30 changed files
with
909 additions
and
487 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { TopBar } from "@mochi-ui/core"; | ||
import { LeftSlot } from "./left-slot"; | ||
import { RightSlot } from "./right-slot"; | ||
|
||
export const Header = () => { | ||
return <TopBar leftSlot={<LeftSlot />} rightSlot={<RightSlot />} />; | ||
}; |
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,19 @@ | ||
import { Button, Typography } from "@mochi-ui/core"; | ||
import { Logo } from "../logo"; | ||
import { DocumentStarSolid, SwapCircleSolid } from "@mochi-ui/icons"; | ||
|
||
export const LeftSlot = () => { | ||
return ( | ||
<div className="flex items-center"> | ||
<Logo /> | ||
<Button variant="link" color="neutral" className="ml-7"> | ||
<SwapCircleSolid className="w-4 h-4 text-text-icon-secondary" /> | ||
<Typography level="p8">Swap</Typography> | ||
</Button> | ||
<Button variant="link" color="neutral"> | ||
<DocumentStarSolid className="w-4 h-4 text-text-icon-secondary" /> | ||
<Typography level="p8">Take a look around</Typography> | ||
</Button> | ||
</div> | ||
); | ||
}; |
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,27 @@ | ||
import { IconButton } from "@mochi-ui/core"; | ||
import { BellSolid } from "@mochi-ui/icons"; | ||
import { useLoginWidget } from "@mochi-web3/login-widget"; | ||
import { LoginPopover } from "../login-popover"; | ||
import ProfileDropdown from "../profile-dropdown"; | ||
|
||
export const RightSlot = () => { | ||
const { isLoggedIn } = useLoginWidget(); | ||
|
||
if (!isLoggedIn) { | ||
return <LoginPopover />; | ||
} | ||
|
||
return ( | ||
<div className="flex items-center space-x-3"> | ||
<IconButton | ||
label="notification" | ||
variant="outline" | ||
color="neutral" | ||
className="!p-1.5" | ||
> | ||
<BellSolid className="w-5 h-5" /> | ||
</IconButton> | ||
<ProfileDropdown /> | ||
</div> | ||
); | ||
}; |
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
Oops, something went wrong.