Skip to content

Commit

Permalink
Merge pull request #154 from CudoVentures/cudos-dev
Browse files Browse the repository at this point in the history
Cudos dev
  • Loading branch information
mlukanova authored Jun 5, 2023
2 parents 52ca121 + 0a24771 commit 26b944d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/assets/vectors/change-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 17 additions & 3 deletions src/components/Layout/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Typography } from '@mui/material'
import { Box, Divider, Typography } from '@mui/material'
import { useSelector } from 'react-redux'
import { RootState } from 'store'
import { headerStyles } from './headerstyles'
Expand All @@ -12,6 +12,7 @@ import TestNetLogoHeader from 'assets/vectors/testnet-logo-header.svg?component'
import CudosLogo from 'assets/vectors/cudos-logo.svg?component'
import LinkIcon from 'assets/vectors/link-icon.svg?component'
import { useEffect, useState } from 'react'
import ChangeIcon from 'assets/vectors/change-icon.svg?component'

const Header = () => {

Expand Down Expand Up @@ -47,6 +48,19 @@ const Header = () => {
</Box>
{isWelcomePage ? null :
<Box gap={2} sx={{ marginRight: '2rem', display: 'flex', alignItems: 'center', flexDirection: isMidLowewRes ? 'column' : 'row' }}>
<Box
gap={1}
sx={headerStyles.linkHolder}
onClick={() => window
.open('https://frontier.osmosis.zone/?from=ATOM&to=CUDOS', 'Swap Cudos')
?.focus()}
>
<ChangeIcon />
<Typography variant="body2" fontWeight={700}>
Swap
</Typography>
</Box>
<Divider orientation='vertical' style={headerStyles.divider} />
<Box
gap={1}
sx={headerStyles.linkHolder}
Expand All @@ -58,9 +72,9 @@ const Header = () => {
<Typography variant="body2" fontWeight={700}>
Cudos Bridge
</Typography>
<LinkIcon style={{ color: 'white' }} />
<LinkIcon />
</Box>
<Box sx={{ display: 'flex' }}>
<Box sx={{ display: 'flex', marginLeft: '10px' }}>
<NetworkInfo />
<UserInfo />
</Box>
Expand Down
12 changes: 10 additions & 2 deletions src/components/Layout/headerstyles.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
import { COLORS_DARK_THEME } from "theme/colors";

export const headerStyles = {
linkHolder: {
cursor: 'pointer',
width: 'max-content',
marginRight: '10px',
display: "flex",
alignItems: "center"
alignItems: "center",
'&:hover': {
color: COLORS_DARK_THEME.PRIMARY_BLUE
}
},
logoHolder: {
cursor: 'pointer',
display: 'flex',
textDecoration: 'none'
},
divider: {
height: '20px',
background: '#7D87AA'
},
headerContainer: {
padding: '2rem',
justifyContent: 'space-between',
Expand Down

0 comments on commit 26b944d

Please sign in to comment.