Skip to content

Commit

Permalink
Update icon used for the share link (#815)
Browse files Browse the repository at this point in the history
Why:
Currently the icon used for the share link is named based off the
content. We would like for this image to be configurable, so the name
should be changed to be based on the usage rather than the content.

This commit:
Replaces `HugEmoji.png` with `ShareImage.png`, which is the standard
material UI 'share' graphic. We also remove some unused iconography
styles.
  • Loading branch information
johnschoeman committed Jan 7, 2021
1 parent 70044b4 commit a867462
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 29 deletions.
2 changes: 1 addition & 1 deletion mobile_resources_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
597e683e82a447beabe038bd89aa86880615b3a3
e012db17d9c98b4ef560147c3ba935a29e1ab5de
4 changes: 3 additions & 1 deletion src/Home/ShareLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,16 @@ const ShareLink: FunctionComponent<ShareLinkProps> = ({ appDownloadUrl }) => {
}
}

const imageSource = Images.ShareImage

return (
<TouchableOpacity
style={style.shareContainer}
onPress={handleOnPressShare}
accessibilityLabel={t("home.bluetooth.share", { applicationName })}
>
<View style={style.shareImageContainer}>
<Image source={Images.HugEmoji} style={style.shareImage} />
<Image source={imageSource} style={style.shareImage} />
</View>
<View style={style.shareTextContainer}>
<Text style={style.shareText}>
Expand Down
Binary file removed src/assets/images/hugEmoji.png
Binary file not shown.
4 changes: 2 additions & 2 deletions src/assets/images/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import HowItWorksIntroduction from "./howItWorksIntroduction.png"
import HowItWorksPersonalPrivacy from "./howItWorksPersonalPrivacy.png"
import HowItWorksPhoneRemembersDevice from "./howItWorksPhoneRemembersDevice.png"
import HowItWorksValueProposition from "./howItWorksValueProposition.png"
import HugEmoji from "./hugEmoji.png"
import ProtectPrivacyExchangeKeys from "./protectPrivacyExchangeKeys.png"
import ProtectPrivacyReceiveKeys from "./protectPrivacyReceiveKeys.png"
import ProtectPrivacyReceiveNotification from "./protectPrivacyReceiveNotification.png"
import ProtectPrivacySubmitKeys from "./protectPrivacySubmitKeys.png"
import ProtectPrivacyTop from "./protectPrivacyTop.png"
import SelfAssessment from "./selfAssessment.png"
import ShareImage from "./shareImage.png"
import SickEmoji from "./sickEmoji.png"
import SmileEmoji from "./smileEmoji.png"
import WelcomeImage from "./welcomeImage.png"
Expand All @@ -26,13 +26,13 @@ export const Images = {
HowItWorksPersonalPrivacy,
HowItWorksPhoneRemembersDevice,
HowItWorksValueProposition,
HugEmoji,
ProtectPrivacyExchangeKeys,
ProtectPrivacyReceiveKeys,
ProtectPrivacyReceiveNotification,
ProtectPrivacySubmitKeys,
ProtectPrivacyTop,
SelfAssessment,
ShareImage,
SickEmoji,
SmileEmoji,
WelcomeImage,
Expand Down
Binary file added src/assets/images/shareImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 0 additions & 25 deletions src/styles/iconography.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,7 @@
import { ViewStyle } from "react-native"

export const tiny = 10
export const xxxSmall = 14
export const xxSmall = 18
export const xSmall = 24
export const small = 30
export const medium = 45
export const large = 60

const baseIcon: ViewStyle = {
alignItems: "center",
justifyContent: "center",
}

export const xSmallIcon: ViewStyle = {
...baseIcon,
height: xSmall,
width: xSmall,
}

export const smallIcon: ViewStyle = {
...baseIcon,
height: small,
width: small,
}

export const largeIcon: ViewStyle = {
...baseIcon,
height: large,
width: large,
}

0 comments on commit a867462

Please sign in to comment.