Refactor style with theme

This commit is contained in:
Nicola Benaglia 2025-04-20 16:28:47 +02:00
parent 510d8037b3
commit 1e456552f4

View File

@ -43,7 +43,13 @@ export const GeneralNotifications = ({ address }) => {
> >
<Tooltip <Tooltip
title={ title={
<span style={{ color: 'white', fontSize: '14px', fontWeight: 700 }}> <span
style={{
color: theme.palette.text.primary,
fontSize: '14px',
fontWeight: 700,
}}
>
PAYMENT NOTIFICATION PAYMENT NOTIFICATION
</span> </span>
} }
@ -53,13 +59,13 @@ export const GeneralNotifications = ({ address }) => {
slotProps={{ slotProps={{
tooltip: { tooltip: {
sx: { sx: {
color: '#ffffff', color: theme.palette.text.primary,
backgroundColor: '#444444', backgroundColor: theme.palette.background.default,
}, },
}, },
arrow: { arrow: {
sx: { sx: {
color: '#444444', color: theme.palette.text.primary,
}, },
}, },
}} }}
@ -68,9 +74,7 @@ export const GeneralNotifications = ({ address }) => {
sx={{ sx={{
color: hasNewPayment color: hasNewPayment
? 'var(--unread)' ? 'var(--unread)'
: theme.palette.mode === 'dark' : theme.palette.text.primary,
? 'rgb(209, 209, 209)'
: 'rgba(41, 41, 43, 1)',
}} }}
/> />
</Tooltip> </Tooltip>
@ -88,14 +92,14 @@ export const GeneralNotifications = ({ address }) => {
> >
<Box <Box
sx={{ sx={{
width: '300px', alignItems: hasNewPayment ? 'flex-start' : 'center',
maxWidth: '100%',
maxHeight: '60vh',
overflow: 'auto',
padding: '5px',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
alignItems: hasNewPayment ? 'flex-start' : 'center', maxHeight: '60vh',
maxWidth: '100%',
overflow: 'auto',
padding: '5px',
width: '300px',
}} }}
> >
{!hasNewPayment && ( {!hasNewPayment && (
@ -110,12 +114,12 @@ export const GeneralNotifications = ({ address }) => {
{hasNewPayment && ( {hasNewPayment && (
<MenuItem <MenuItem
sx={{ sx={{
alignItems: 'flex-start',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: '5px', gap: '5px',
width: '100%',
alignItems: 'flex-start',
textWrap: 'auto', textWrap: 'auto',
width: '100%',
}} }}
onClick={() => { onClick={() => {
setAnchorEl(null); setAnchorEl(null);
@ -124,18 +128,18 @@ export const GeneralNotifications = ({ address }) => {
> >
<Card <Card
sx={{ sx={{
padding: '10px',
width: '100%',
backgroundColor: '#1F2023', backgroundColor: '#1F2023',
gap: '5px',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: '5px',
padding: '10px',
width: '100%',
}} }}
> >
<Box <Box
sx={{ sx={{
display: 'flex',
alignItems: 'center', alignItems: 'center',
display: 'flex',
gap: '5px', gap: '5px',
justifyContent: 'space-between', justifyContent: 'space-between',
}} }}
@ -147,6 +151,7 @@ export const GeneralNotifications = ({ address }) => {
/>{' '} />{' '}
{formatDate(latestTx?.timestamp)} {formatDate(latestTx?.timestamp)}
</Box> </Box>
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',
@ -157,6 +162,7 @@ export const GeneralNotifications = ({ address }) => {
> >
<Typography>{latestTx?.amount}</Typography> <Typography>{latestTx?.amount}</Typography>
</Box> </Box>
<Typography <Typography
sx={{ sx={{
fontSize: '0.8rem', fontSize: '0.8rem',