Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Various fixes and enhancements #1628

Merged
merged 4 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/components/Berachain/BerachainExploreProtocol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ export const BerachainExploreProtocol = ({
return (
<Container>
<Background />
<Link href="/berachain/explore" style={{ textDecoration: 'none' }}>
<BerachainBackButton>
<ArrowBackIcon />
<Typography variant="bodySmallStrong">Explore Berachain</Typography>
</BerachainBackButton>
</Link>
<BerachainProtocolInformation />
</Container>
);
Expand All @@ -60,12 +54,6 @@ export const BerachainExploreProtocol = ({
return (
<Container>
<Background />
<Link href="/berachain/explore" style={{ textDecoration: 'none' }}>
<BerachainBackButton>
<ArrowBackIcon />
<Typography variant="bodySmallStrong">Explore Berachain</Typography>
</BerachainBackButton>
</Link>
{/* {card && */}
<BerachainProtocolInformation
market={roycoDataMarket}
Expand Down
17 changes: 17 additions & 0 deletions src/components/Berachain/components/BackButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { ReactNode } from 'react';
import { Link, Typography } from '@mui/material';
import { BerachainBackButton } from '@/components/Berachain/Berachain.style';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';

function BackButton() {
return (
<Link href="/berachain/explore" style={{ textDecoration: 'none' }}>
<BerachainBackButton>
<ArrowBackIcon />
<Typography variant="bodySmallStrong">Explore Berachain</Typography>
</BerachainBackButton>
</Link>
);
}

export default BackButton;
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ export const BerachainMarketCard = ({
}}
>
<DigitTokenSymbolCard
sx={(theme) => ({
'.tooltip-icon': {
color: theme.palette.alphaLight500.main,
},
'.title': {
color: '#8b8989',
fontSize: '0.75rem',
},
})}
title={deposited ? 'Deposited' : 'Deposit'}
tooltipText={deposited ? DEPOSITED_TOOLTIP : DEPOSIT_TOOLTIP}
tokenImage={roycoData?.input_token_data?.image}
Expand All @@ -185,9 +194,19 @@ export const BerachainMarketCard = ({
hasDeposited={deposited ? true : false}
/>
<DigitCard
sx={{
sx={(theme) => ({
'.tooltip-icon': {
color: theme.palette.alphaLight500.main,
},
alignItems: 'flex-end',
}}
'.title': {
color: '#8b8989',
fontSize: '0.75rem',
},
'.content': {
marginTop: 1,
},
})}
title={'TVL'}
tooltipText={TVL_TOOLTIP}
digit={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const BerachainProgressCard = ({
<BeraChainProgressCardHeader display={'flex'}>
<Typography
variant="bodySmall"
className="title"
sx={(theme) => ({
typography: {
xs: theme.typography.bodyXSmall,
Expand All @@ -46,6 +47,7 @@ export const BerachainProgressCard = ({
</Typography>
{(tooltip || showTooltipIcon) && (
<Tooltip
className="tooltip-icon"
title={tooltip}
placement={'top'}
enterTouchDelay={0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const DigitCard = ({
{title}
</Typography>
<Tooltip
className="tooltip-icon"
title={tooltipText}
placement={'top'}
enterTouchDelay={0}
Expand All @@ -61,6 +62,7 @@ const DigitCard = ({
marginTop={'4px'}
sx={(theme) => ({
display: 'inline-flex',
marginTop: 1,
typography: {
xs: theme.typography.titleXSmall,
sm: theme.typography.titleXSmall,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const DigitTokenSymbolCard = ({
<BeraChainProgressCardContent sx={sx}>
<BeraChainProgressCardHeader display={'flex'}>
<Typography
className="title"
variant="bodySmall"
sx={(theme) => ({
typography: {
Expand All @@ -42,6 +43,7 @@ const DigitTokenSymbolCard = ({
{title}
</Typography>
<Tooltip
className="tooltip-icon"
title={tooltipText}
placement={'top'}
enterTouchDelay={0}
Expand All @@ -65,7 +67,8 @@ const DigitTokenSymbolCard = ({
}}
>
<BerachainMarketCardTokenContainer
sx={{ display: 'flex', alignItems: 'center', gap: '4px' }}
className="content-wrapper"
sx={{ display: 'flex', alignItems: 'flex-end', gap: '4px' }}
key={`berachain-market-card-token-container-name-${title}`}
>
{tokenImage ? (
Expand All @@ -89,6 +92,7 @@ const DigitTokenSymbolCard = ({
className="content"
marginTop={'4px'}
sx={(theme) => ({
marginTop: 1,
typography: {
xs: theme.typography.titleXSmall,
sm: theme.typography.titleXSmall,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Breakpoint } from '@mui/material';
import type { Breakpoint, SxProps } from '@mui/material';
import { alpha, Box, Tooltip, Typography, useTheme } from '@mui/material';
import { BerachainProgressCard } from './BerachainProgressCard';
import { Theme } from '@mui/material/styles';

interface DigitCardProps {
title: string;
Expand All @@ -18,15 +19,23 @@ const DigitTooltipCard = ({ title, digit, tooltipText }: DigitCardProps) => {
title={title}
value={digit}
showTooltipIcon={true}
sx={{
sx={(theme) => ({
'.title': {
color: '#8b8989',
fontSize: '0.75rem',
},
'.tooltip-icon': {
color: theme.palette.alphaLight500.main,
},
height: '100%',
padding: theme.spacing(1.5, 2),
display: 'flex',
[theme.breakpoints.up('sm' as Breakpoint)]: {
padding: theme.spacing(1.5, 2),
},
}}
})}
valueSx={{
marginTop: 1,
color: alpha(theme.palette.white.main, 0.84),
fontSize: theme.typography.titleXSmall.fontSize,
[theme.breakpoints.up('sm' as Breakpoint)]: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,25 @@ const TokenIncentivesCard = ({ marketData, tokens }: DigitCardProps) => {
<Typography
variant="bodySmall"
sx={(theme) => ({
color: '#8b8989',
typography: {
xs: theme.typography.bodyXSmall,
sm: theme.typography.bodySmall,
},
// important needed as the previous rules are overriding the fontSize
fontSize: '0.75rem!important',
})}
>
{'Total Incentives'}
</Typography>
<Tooltip title={''} placement={'top'} enterTouchDelay={0} arrow>
<InfoIcon
sx={{
sx={(theme) => ({
color: theme.palette.alphaLight500.main,
width: '16px',
height: '16px',
marginLeft: '4px',
color: 'inherit',
}}
})}
/>
</Tooltip>
</BeraChainProgressCardHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const TokenIncentivesData = ({
sx={{
display: 'flex',
alignItems: 'center',
marginTop: '4px',
marginTop: '8px',
gap: 1,
}}
key={incentiveTokenData?.id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const BerachainSearch = () => {
},
}}
{...params}
placeholder="Search for markets"
placeholder="Search for markets or tokens"
InputLabelProps={{
...params.InputLabelProps,
shrink: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ export const BerachainProtocolActionInfoBox = styled(Box)(({ theme }) => ({
maxWidth: 380,
},
[theme.breakpoints.up('md' as Breakpoint)]: {
maxWidth: 640,
maxWidth: 760,
padding: theme.spacing(3),
},
}));

export const BerachainInformationProtocolIntro = styled(Box)(({ theme }) => ({
display: 'flex',
flexDirection: 'row',
flexDirection: 'column',
gap: theme.spacing(2),
}));

Expand Down
Loading
Loading