Skip to content

Commit

Permalink
Merge pull request #272 from invariant-labs/no-token-found-placeholder
Browse files Browse the repository at this point in the history
create no token found placeholder
  • Loading branch information
wojciech-cichocki authored Aug 8, 2024
2 parents 049e6cf + 527d89f commit fc326ce
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,23 @@ export const SelectTokenModal: React.FC<ISelectTokenModal> = ({
/>
</Grid>
<Box className={classes.tokenList}>
{!filteredTokens.length && (
<Grid className={classes.noTokenFoundContainer}>
<img className={classes.img} src={icons.empty} alt='Not connected' />
<Typography className={classes.noTokenFoundPlaceholder}>
No token found...
</Typography>
<Typography className={classes.noTokenFoundPlaceholder}>
Add your token by pressing the button!
</Typography>
<Button
className={classes.addTokenButton}
onClick={() => setIsAddOpen(true)}
variant='contained'>
Add a token
</Button>
</Grid>
)}
<List
height={400}
width={360}
Expand Down
34 changes: 34 additions & 0 deletions src/components/Modals/SelectModals/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,40 @@ const useStyles = makeStyles()((theme: Theme) => {
marginLeft: 10,
cursor: 'pointer',
fontSize: 28
},
noTokenFoundPlaceholder: {
...typography.body2,
fontWeight: 500,
lineHeight: '20px',
color: colors.invariant.lightHover
},
addTokenButton: {
height: 40,
width: 200,
marginTop: 20,
color: colors.invariant.componentBcg,
...typography.body1,
textTransform: 'none',
borderRadius: 14,
background: colors.invariant.pinkLinearGradientOpacity,

'&:hover': {
background: colors.invariant.pinkLinearGradient,
boxShadow: '0px 0px 16px rgba(239, 132, 245, 0.35)',
'@media (hover: none)': {
background: colors.invariant.pinkLinearGradientOpacity,
boxShadow: 'none'
}
}
},
noTokenFoundContainer: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: 32
},
img: {
paddingBottom: 25
}
}
})
Expand Down

0 comments on commit fc326ce

Please sign in to comment.