Add responsive styles for wallet components and integrate CSS

This commit is contained in:
Jasneet Singh committed 2025-02-28 21:13:03 -05:00
1 parent 64166d2539
commit 4b63076acc
3 files changed
+51 -44

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
.wallet-adapter-dropdown {
width: 100%;
}
.wallet-adapter-button {
width: 100%;
justify-content: center;
height: var(--button-height) !important;
font-size: var(--font-size-body) !important;
font-weight: var(--font-weight-medium) !important;
margin: var(--spacing-xs) 0;
white-space: nowrap;
}
.wallet-adapter-modal-title {
font-size: var(--font-size-h5) !important;
}
/* Separator styling */
.wallet-adapter-modal-divider {
background-color: var(--border-color) !important;
margin: var(--spacing-md) 0 !important;
}
/* Responsive fixes */
@media (max-width: 1093px) {
.wallet-adapter-button {
padding: var(--spacing-xs) var(--spacing-sm) !important;
font-size: calc(var(--font-size-body) * 0.9) !important;
}
}
@media (max-width: 910px) {
.wallet-adapter-modal-wrapper {
flex-direction: column !important;
}
.wallet-adapter-modal-divider {
margin: var(--spacing-sm) 0 !important;
}
}
+1
View File
@@ -9,6 +9,7 @@ import {
import { WalletModalProvider } from "@solana/wallet-adapter-react-ui";
import { clusterApiUrl } from "@solana/web3.js";
import PropTypes from "prop-types";
import "./index.css";
// Default styles that can be overridden by your app
import "@solana/wallet-adapter-react-ui/styles.css";
+9 -44
View File
@@ -371,54 +371,19 @@ const Settings = () => {
monitor to connect to multiple nodes globally.
</Typography>
</Box>
<Box
sx={{
display: 'flex',
flexWrap: 'wrap',
gap: theme.spacing(2),
mt: theme.spacing(4),
}}
>
<WalletMultiButton
sx={{
minWidth: theme.spacing(32),
height: theme.spacing(10),
fontSize: theme.typography.body2.fontSize,
fontWeight: theme.typography.fontWeightMedium,
'&:not(:disabled)': {
backgroundColor: theme.palette.accent.main,
'&:hover': {
backgroundColor: theme.palette.accent.dark,
},
},
[theme.breakpoints.down('sm')]: {
minWidth: '100%',
fontSize: theme.typography.body2.fontSize,
},
}}
/>
<WalletDisconnectButton
sx={{
minWidth: theme.spacing(32),
height: theme.spacing(10),
fontSize: theme.typography.body2.fontSize,
fontWeight: theme.typography.fontWeightMedium,
'&:not(:disabled)': {
backgroundColor: theme.palette.error.main,
'&:hover': {
backgroundColor: theme.palette.error.dark,
},
},
[theme.breakpoints.down('sm')]: {
minWidth: '100%',
fontSize: theme.typography.body2.fontSize,
},
}}
/>
<Box>
<Stack
direction="row"
spacing={2}
>
<WalletMultiButton />
<WalletDisconnectButton />
</Stack>
</Box>
</ConfigBox>
)}
<ConfigBox>
<Box>
<Typography component="h1">About</Typography>