-
Notifications
You must be signed in to change notification settings - Fork 14
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
84abe05
commit e8ad6bf
Showing
3 changed files
with
104 additions
and
20 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,28 @@ | ||
import { Container, Grid, Typography } from '@mui/material' | ||
import { type ReactElement } from 'react' | ||
import type { BaseBlock } from '@/components/Home/types' | ||
import layoutCss from '@/components/common/styles.module.css' | ||
import css from './styles.module.css' | ||
|
||
const Stats = ({ title, items }: BaseBlock): ReactElement => ( | ||
<Container className={layoutCss.containerShort}> | ||
<Typography variant="h2" mb={3} textAlign="center"> | ||
{title} | ||
</Typography> | ||
|
||
<Grid container spacing={{ xs: '30px', xl: '50px' }} justifyContent="space-between"> | ||
{items?.map((item, index) => ( | ||
<Grid item xs={12} md={4} key={index}> | ||
<a href={item.link?.href} target="_blank" rel="noreferrer" className={css.metric}> | ||
{/* TODO: Fetch these values from a Dune query */} | ||
<p className={css.value}>{item.title}</p> | ||
|
||
<Typography variant="caption">{item.text}</Typography> | ||
</a> | ||
</Grid> | ||
))} | ||
</Grid> | ||
</Container> | ||
) | ||
|
||
export default Stats |
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,29 @@ | ||
.metric { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.metric span { | ||
transition: color var(--transition-duration) ease; | ||
} | ||
|
||
.metric:hover span { | ||
color: var(--mui-palette-primary-main); | ||
} | ||
|
||
.value { | ||
margin: 0; | ||
font-size: 64px; | ||
line-height: 64px; | ||
background: linear-gradient(270deg, rgba(18, 255, 128, 1) 0%, rgba(95, 221, 255, 1) 100%); | ||
background-clip: text; | ||
color: transparent; | ||
} | ||
|
||
@media (min-width: 600px) { | ||
.value { | ||
font-size: 80px; | ||
line-height: 100px; | ||
} | ||
} |
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