-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update neutron [web-neutron] (#1320)
## Description Closes: #XXXX <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### Author Checklist _All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues._ I have... - [x] ran linting via `yarn lint` - [ ] wrote tests where necessary - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] targeted the correct branch - [x] provided a link to the relevant issue or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed - [x] added a changeset via [`yarn && yarn changeset`](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)
- Loading branch information
Showing
20 changed files
with
302 additions
and
292 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'web-neutron': major | ||
--- | ||
|
||
updated params page and token display in staking component |
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,54 @@ | ||
import { motion, Transition, Variants } from 'framer-motion'; | ||
import Banner, { getBannersLinks } from '@/components/banner'; | ||
import Footer from '@/components/footer'; | ||
import useStyles from '@/components/layout/styles'; | ||
import type { LayoutProps } from '@/components/layout/types'; | ||
import Nav from '@/components/nav'; | ||
import Typography from '@mui/material/Typography'; | ||
import useAppTranslation from '@/hooks/useAppTranslation'; | ||
|
||
const bannerLinks = getBannersLinks(); | ||
|
||
const variants: Variants = { | ||
initial: { filter: 'blur(4px)' }, | ||
animate: { filter: 'blur(0px)' }, | ||
exit: { filter: 'blur(4px)' }, | ||
}; | ||
|
||
const transition: Transition = { | ||
duration: 1, | ||
}; | ||
|
||
const Layout = (props: LayoutProps) => { | ||
const { classes, cx } = useStyles(); | ||
const { children, navTitle, className } = props; | ||
const { t } = useAppTranslation('validators'); | ||
|
||
return ( | ||
<motion.div | ||
initial="initial" | ||
animate="animate" | ||
exit="exit" | ||
variants={variants} | ||
transition={transition} | ||
className={classes.root} | ||
> | ||
<div className={classes.contentWrapper}> | ||
<Nav title={navTitle} /> | ||
<div className={classes.children}> | ||
<div className={classes.appBarPlaceholder} /> | ||
{!!bannerLinks.length && <Banner />} | ||
{navTitle === 'Validators' ? ( | ||
<div className={classes.content}> | ||
<Typography variant="h4"> {t('stakingDataIsSourcedFromCosmoshub')}</Typography> | ||
</div> | ||
) : null} | ||
<div className={cx(className, 'main-content')}>{children}</div> | ||
</div> | ||
</div> | ||
<Footer className={classes.footer} /> | ||
</motion.div> | ||
); | ||
}; | ||
|
||
export default Layout; |
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,49 @@ | ||
import { CSSObject } from '@emotion/react'; | ||
import { makeStyles } from 'tss-react/mui'; | ||
|
||
const useStyles = makeStyles()(theme => ({ | ||
root: { | ||
[theme.breakpoints.up('lg')]: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
minHeight: '100vh', | ||
}, | ||
}, | ||
contentWrapper: { | ||
[theme.breakpoints.up('lg')]: { | ||
display: 'flex', | ||
flex: 1, | ||
}, | ||
}, | ||
footer: { | ||
[theme.breakpoints.up('lg')]: { | ||
position: 'relative', | ||
zIndex: 1299, | ||
}, | ||
}, | ||
appBarPlaceholder: theme.mixins.toolbar as CSSObject, | ||
children: { | ||
flexGrow: 1, | ||
display: 'flex', | ||
flexDirection: 'column', | ||
'& .main-content': { | ||
width: '100%', | ||
flex: 1, | ||
}, | ||
}, | ||
content: { | ||
flex: 1, | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'space-around', | ||
textAlign: 'center', | ||
color: theme.palette.custom.fonts.fontOne, | ||
backgroundColor: theme.palette.custom.wallet.backgroundTwo, | ||
padding: theme.spacing(1.5), | ||
marginTop: theme.spacing(2), | ||
marginLeft: theme.spacing(1), | ||
marginRight: theme.spacing(1), | ||
}, | ||
})); | ||
|
||
export default useStyles; |
76 changes: 76 additions & 0 deletions
76
apps/web-neutron/src/components/nav/components/title_bar/styles.ts
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,76 @@ | ||
import { makeStyles } from 'tss-react/mui'; | ||
|
||
const useStyles = makeStyles()((theme) => ({ | ||
root: { | ||
padding: theme.spacing(1, 2), | ||
display: 'flex', | ||
justifyContent: 'center', | ||
flexDirection: 'column', | ||
alignItems: 'flex-start', | ||
[theme.breakpoints.up('lg')]: { | ||
padding: theme.spacing(1, 3), | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'space-between', | ||
flexDirection: 'row', | ||
width: '100%', | ||
'& .MuiTypography-h1': { | ||
lineHeight: 1, | ||
alignSelf: 'flex-end', | ||
}, | ||
}, | ||
'&& h1': { | ||
lineHeight: '56px', | ||
}, | ||
}, | ||
logo: { | ||
height: '36px', | ||
}, | ||
content: { | ||
width: '100%', | ||
background: theme.palette.custom.general.surfaceOne, | ||
marginTop: theme.spacing(2), | ||
borderRadius: theme.shape.borderRadius, | ||
padding: theme.spacing(1), | ||
display: 'flex', | ||
flexDirection: 'column', | ||
flexWrap: 'wrap', | ||
alignItems: 'flex-start', | ||
[theme.breakpoints.up('md')]: { | ||
flexDirection: 'row', | ||
}, | ||
[theme.breakpoints.up('lg')]: { | ||
alignItems: 'center', | ||
justifyContent: 'space-between', | ||
marginTop: 0, | ||
width: '70%', | ||
padding: theme.spacing(1, 3), | ||
flexWrap: 'nowrap', | ||
}, | ||
}, | ||
item: { | ||
display: 'flex', | ||
alignItems: 'flex-start', | ||
justifyContent: 'flex-start', | ||
flexDirection: 'column', | ||
padding: theme.spacing(1), | ||
width: '100%', | ||
'& .label': { | ||
marginRight: theme.spacing(1), | ||
}, | ||
[theme.breakpoints.up('sm')]: { | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'space-between', | ||
}, | ||
[theme.breakpoints.up('md')]: { | ||
width: '50%', | ||
}, | ||
[theme.breakpoints.up('lg')]: { | ||
padding: 0, | ||
width: 'auto', | ||
}, | ||
}, | ||
})); | ||
|
||
export default useStyles; |
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.
f464068
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cosmos – ./
cosmos-bigdipper.vercel.app
bigdipper.vercel.app
cosmos-git-main-bigdipper.vercel.app