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(ui-ux): updated twitter logo to its latest version #4010

Merged
merged 1 commit into from
Aug 2, 2023
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
23 changes: 23 additions & 0 deletions mobile-app/app/components/icons/assets/TwitterIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Svg, { Path, SvgProps } from "react-native-svg";

export function TwitterIcon({
testID,
color,
...props
}: SvgProps): JSX.Element {
return (
<Svg
width="48"
height="48"
viewBox="0 0 48 48"
fill="none"
testID={testID}
{...props}
>
<Path
d="M10.0681 10.8965L20.8786 25.3514L10 37.1035H12.4485L21.9729 26.8141L29.6681 37.1035H38L26.581 21.8358L36.7069 10.8965H34.2584L25.4872 20.3726L18.4 10.8965H10.0681ZM13.6688 12.7004H17.4964L34.3989 35.3001H30.5712L13.6688 12.7004Z"
fill={color}
/>
</Svg>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ThemedTouchableOpacityV2,
ThemedViewV2,
} from "@components/themed";
import { tailwind } from "@tailwind";
import { getColor, tailwind } from "@tailwind";
import { translate } from "@translations";
import { NavigationProp, useNavigation } from "@react-navigation/native";
import { openURL } from "@api/linking";
Expand All @@ -21,6 +21,7 @@ import DeFiChainWalletImageDark from "@assets/images/DeFiChainWallet-dark.png";
import GridBackgroundImageLight from "@assets/images/about-grid-bg-light.png";
import GridBackgroundImageDark from "@assets/images/about-grid-bg-dark.png";
import { VersionTag } from "@components/VersionTag";
import { TwitterIcon } from "@components/icons/assets/TwitterIcon";
import { SettingsParamList } from "../SettingsNavigator";

interface AboutScreenLinks {
Expand Down Expand Up @@ -177,7 +178,7 @@ export function AboutScreen(): JSX.Element {

<View style={tailwind("flex-row justify-center pt-11")}>
{SOCIAL_LINKS.map((link) => (
<SocialIcon {...link} key={link.testID} />
<SocialLink {...link} key={link.testID} />
))}
</View>
</ImageBackground>
Expand Down Expand Up @@ -272,7 +273,7 @@ function LinkItemRow({
);
}

function SocialIcon({
function SocialLink({
iconName,
url,
testID,
Expand All @@ -291,18 +292,38 @@ function SocialIcon({
)}
testID={testID}
>
<ThemedIcon
dark={tailwind("text-mono-dark-v2-00")}
light={tailwind("text-mono-light-v2-00")}
style={tailwind("pl-px")}
iconType="MaterialCommunityIcons"
name={iconName}
size={24}
/>
<SocialIcon name={iconName} />
</ThemedTouchableOpacityV2>
);
}

function SocialIcon({
name,
}: {
name: React.ComponentProps<typeof MaterialCommunityIcons>["name"];
}) {
const { isLight } = useThemeContext();
if (name === "twitter") {
return (
<TwitterIcon
color={getColor(isLight ? "mono-light-v2-00" : "mono-dark-v2-00")}
width={24}
height={24}
/>
);
}
return (
<ThemedIcon
dark={tailwind("text-mono-dark-v2-00")}
light={tailwind("text-mono-light-v2-00")}
style={tailwind("pl-px")}
iconType="MaterialCommunityIcons"
name={name}
size={24}
/>
);
}

function AboutLinkItem({
link,
isLast,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.