-
Notifications
You must be signed in to change notification settings - Fork 25
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
a6f2f34
commit 900857c
Showing
9 changed files
with
103 additions
and
28 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
14 changes: 14 additions & 0 deletions
14
packages/curve-common/src/widgets/Header/HeaderLogoWithMenu.tsx
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,14 @@ | ||
import { AppName } from 'ui/src/AppNav/types' | ||
import IconButton from '@mui/material/IconButton' | ||
import MenuIcon from '@mui/icons-material/Menu' | ||
import { HeaderLogo } from './HeaderLogo' | ||
import React from 'react' | ||
|
||
export const HeaderLogoWithMenu = (props: { onClick: () => void, appName: AppName }) => ( | ||
<> | ||
<IconButton onClick={props.onClick} sx={{ display: 'inline-flex' }}> | ||
<MenuIcon fontSize="small" /> | ||
</IconButton> | ||
<HeaderLogo appName={props.appName} /> | ||
</> | ||
) |
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
39 changes: 39 additions & 0 deletions
39
packages/curve-common/src/widgets/Header/SocialSidebarSection.tsx
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 { SidebarSection } from './SidebarSection' | ||
import { t } from '@lingui/macro' | ||
import IconButton from '@mui/material/IconButton' | ||
import { ReactElement } from 'react' | ||
import TelegramIcon from '@mui/icons-material/Telegram' | ||
import TwitterIcon from '@mui/icons-material/Twitter' | ||
import YouTubeIcon from '@mui/icons-material/YouTube' | ||
import Tooltip from '@mui/material/Tooltip' | ||
import Link from '@mui/material/Link' | ||
import { DiscordIcon } from 'curve-ui-kit/src/shared/ui/DiscordIcon' | ||
import { Box } from 'curve-ui-kit/src/shared/ui/Box' | ||
import SvgIcon from '@mui/material/SvgIcon'; | ||
|
||
type SocialButtonProps = { | ||
label: string, | ||
href: string, | ||
icon: typeof SvgIcon | ||
} | ||
|
||
const SocialButton = ({ icon: Icon, href, label }: SocialButtonProps) => ( | ||
<IconButton component={Link} href={href} target="_blank" rel="noopener noreferrer"> | ||
<Tooltip title={label}> | ||
<Icon fontSize="large" color="primary" /> | ||
</Tooltip> | ||
</IconButton> | ||
) | ||
|
||
type SocialSidebarSectionProps = { currentPath: string } | ||
|
||
export const SocialSidebarSection = (props: SocialSidebarSectionProps) => ( | ||
<SidebarSection title={t`Socials`} currentPath={props.currentPath}> | ||
<Box display="flex" justifyContent="space-around"> | ||
<SocialButton label="Discord" href="https://discord.gg/rgrfS7W" icon={DiscordIcon} /> | ||
<SocialButton label="Telegram" href="https://t.me/curvefi" icon={TelegramIcon} /> | ||
<SocialButton label="Twitter" href="https://x.com/curvefinance" icon={TwitterIcon} /> | ||
<SocialButton label="YouTube" href="https://www.youtube.com/@CurveFinanceChannel" icon={YouTubeIcon} /> | ||
</Box> | ||
</SidebarSection> | ||
) |
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 {Header} from './Header'; |
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,9 @@ | ||
import { createSvgIcon } from '@mui/material/utils' | ||
import React from 'react' | ||
|
||
export const DiscordIcon = createSvgIcon( | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34" fill="currentColor"> | ||
<path | ||
d="M26.0015 6.9529C24.0021 6.03845 21.8787 5.37198 19.6623 5C19.3833 5.48048 19.0733 6.13144 18.8563 6.64292C16.4989 6.30193 14.1585 6.30193 11.8336 6.64292C11.6166 6.13144 11.2911 5.48048 11.0276 5C8.79575 5.37198 6.67235 6.03845 4.6869 6.9529C0.672601 12.8736 -0.41235 18.6548 0.130124 24.3585C2.79599 26.2959 5.36889 27.4739 7.89682 28.2489C8.51679 27.4119 9.07477 26.5129 9.55525 25.5675C8.64079 25.2265 7.77283 24.808 6.93587 24.312C7.15286 24.1571 7.36986 23.9866 7.57135 23.8161C12.6241 26.1255 18.0969 26.1255 23.0876 23.8161C23.3046 23.9866 23.5061 24.1571 23.7231 24.312C22.8861 24.808 22.0182 25.2265 21.1037 25.5675C21.5842 26.5129 22.1422 27.4119 22.7621 28.2489C25.2885 27.4739 27.8769 26.2959 30.5288 24.3585C31.1952 17.7559 29.4733 12.0212 26.0015 6.9529ZM10.2527 20.8402C8.73376 20.8402 7.49382 19.4608 7.49382 17.7714C7.49382 16.082 8.70276 14.7025 10.2527 14.7025C11.7871 14.7025 13.0425 16.082 13.0115 17.7714C13.0115 19.4608 11.7871 20.8402 10.2527 20.8402ZM20.4373 20.8402C18.9183 20.8402 17.6768 19.4608 17.6768 17.7714C17.6768 16.082 18.8873 14.7025 20.4373 14.7025C21.9717 14.7025 23.2271 16.082 23.1961 17.7714C23.1961 19.4608 21.9872 20.8402 20.4373 20.8402Z" /> | ||
</svg>, 'Discord' | ||
) |
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