Skip to content

Commit

Permalink
[react] NetworkSelector component UI tweaks (#1653)
Browse files Browse the repository at this point in the history
  • Loading branch information
MananTank authored Sep 25, 2023
1 parent 1018eb5 commit bd18e4f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-turkeys-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@thirdweb-dev/react": patch
---

NetworkSelector component UI tweaks
44 changes: 23 additions & 21 deletions packages/react/src/wallet/ConnectWallet/NetworkSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import type { Chain } from "@thirdweb-dev/chains";
import Fuse from "fuse.js";
import { Button } from "../../components/buttons";
import { useEffect } from "react";
import { Container, noScrollBar } from "../../components/basic";
import { Container, Line, noScrollBar } from "../../components/basic";
import { Text } from "../../components/text";
import { ModalTitle } from "../../components/modalElements";
import { CustomThemeProvider } from "../../design-system/CustomThemeProvider";
Expand Down Expand Up @@ -260,24 +260,26 @@ export const NetworkSelector: React.FC<NetworkSelectorProps> = (props) => {

{onCustomClick && (
<>
<Spacer y="sm" />
<Button
fullWidth
variant="link"
onClick={() => {
onCustomClick();
if (onClose) {
onClose();
}
}}
style={{
display: "flex",
fontSize: fontSize.sm,
boxShadow: "none",
}}
>
Add Custom Network
</Button>
<Line />
<Container p="lg">
<Button
fullWidth
variant="link"
onClick={() => {
onCustomClick();
if (onClose) {
onClose();
}
}}
style={{
display: "flex",
fontSize: fontSize.sm,
boxShadow: "none",
}}
>
Add Custom Network
</Button>
</Container>
</>
)}
</Tabs.Root>
Expand Down Expand Up @@ -538,14 +540,14 @@ const SectionLabel = styled.p<{ theme?: Theme }>`
font-size: ${fontSize.sm};
color: ${(p) => p.theme.colors.secondaryText};
margin: 0;
display: block;
padding: 0 ${spacing.xs};
`;

const ScrollContainer = styled.div<{ theme?: Theme }>`
box-sizing: border-box;
overflow: auto;
padding-bottom: ${spacing.lg};
-webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
${noScrollBar};
`;

Expand Down

0 comments on commit bd18e4f

Please sign in to comment.