Skip to content

Commit

Permalink
fix: [GSW-2040] Mobile UI
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrg committed Jan 16, 2025
1 parent 77a5bb8 commit 349c881
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { fonts } from "@constants/font.constant";
import styled from "@emotion/styled";
import { media } from "@styles/media";

export const ConnectSocialWalletModalWrapper = styled.div`
display: flex;
Expand Down Expand Up @@ -61,6 +62,8 @@ export const ConnectSocialWalletModalWrapper = styled.div`
flex-direction: column;
align-items: center;
gap: 8px;
text-align: center;
.title {
color: ${({ theme }) => theme.color.text01};
font-size: 18px;
Expand Down Expand Up @@ -89,4 +92,8 @@ export const ConnectSocialWalletModalWrapper = styled.div`
}
}
}
${media.mobile} {
width: 328px;
padding: 15px 11px;
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ interface ConnectSocialWalletModalProps {
const ConnectSocialWalletModal = ({ close, loginType }: ConnectSocialWalletModalProps) => {
const { connectingState } = useSocialWalletContext();

const displayLoginType = React.useMemo(() => {
switch (loginType) {
case "email":
return "Email";
case "google":
return "Google";
case "twitter":
return "X";
default:
return "Unknown";
}
}, [loginType]);

React.useEffect(() => {
if (connectingState === "done" || connectingState === "error") {
close();
Expand All @@ -35,7 +48,7 @@ const ConnectSocialWalletModal = ({ close, loginType }: ConnectSocialWalletModal
<LoadingSpinner />
</div>
<div className="description">
<div className="title">Connecting to {loginType}</div>
<div className="title">Connecting to {displayLoginType}</div>
{loginType === "email" ? (
<div className="text">Check your email to approve the connection.</div>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ export const ConnectWalletModalWrapper = styled.div`
* {
fill: ${({ theme }) => theme.color.text05};
}
&:hover {
* {
fill: ${({ theme }) => (theme.themeKey === "dark" ? theme.color.background07 : theme.color.border07)};
}
}
}
${media.mobile} {
Expand All @@ -96,14 +101,22 @@ export const ConnectWalletModalWrapper = styled.div`
.validation-message {
color: ${({ theme }) => theme.color.red01};
font-weight: 500;
${media.mobile} {
font-size: 14px;
}
}
> div {
width: 100%;
.button-connect {
gap: 8px;
height: 57px;
&.adena {
&.dark {
&:hover {
background-color: ${({ theme }) => (theme.themeKey === "dark" ? theme.color.hover02 : "")};
}
}
&.primary {
span {
color: white;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const ConnectWalletModal: React.FC<Props> = ({ close, connect, loadingConnect })
hierarchy: ButtonHierarchy.Dark,
fullWidth: true,
}}
className="button-connect"
className="button-connect dark"
/>

<Button
Expand All @@ -123,7 +123,7 @@ const ConnectWalletModal: React.FC<Props> = ({ close, connect, loadingConnect })
hierarchy: ButtonHierarchy.Dark,
fullWidth: true,
}}
className="button-connect"
className="button-connect dark"
/>
</div>

Expand All @@ -145,7 +145,7 @@ const ConnectWalletModal: React.FC<Props> = ({ close, connect, loadingConnect })
hierarchy: ButtonHierarchy.Primary,
fullWidth: true,
}}
className="button-connect "
className="button-connect primary"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const DividerWrapper = styled.div`
span {
${fonts.body12}color: ${({ theme }) => theme.color.text01};
font-size: 10px;
font-size: 12px;
font-weight: 500;
}
`;

0 comments on commit 349c881

Please sign in to comment.