Skip to content

Commit c7f5047

Browse files
authored
added github link and icon (#207)
1 parent 7a2ede8 commit c7f5047

File tree

4 files changed

+65
-50
lines changed

4 files changed

+65
-50
lines changed

App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { StatusBar } from 'expo-status-bar';
22
import * as React from 'react';
33
import { SafeAreaView } from 'react-native';
4+
import { GithubIcon } from 'src/components/GithubIcon';
45
import { HomeScreen } from 'src/screen/HomeScreen';
56
import { ThemeProvider, StyleSheet } from 'src/styles';
67

@@ -11,6 +12,7 @@ export default function App() {
1112
<ThemeProvider>
1213
<HomeScreen />
1314
</ThemeProvider>
15+
<GithubIcon />
1416
</SafeAreaView>
1517
);
1618
}

src/assets/Github.tsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import * as React from 'react';
2+
import Svg, { Path } from 'react-native-svg';
3+
4+
function SvgComponent(props) {
5+
return (
6+
<Svg
7+
width={70}
8+
height={70}
9+
viewBox="0 0 250 250"
10+
style={{
11+
position: 'absolute',
12+
top: 0,
13+
border: 0,
14+
right: 0,
15+
}}
16+
aria-hidden="true"
17+
fill="#70b7fd"
18+
color="#fff"
19+
{...props}
20+
>
21+
<Path d="M0 0l115 115h15l12 27 108 108V0z" />
22+
<Path
23+
d="M128.3 109c-14.5-9.3-9.3-19.4-9.3-19.4 3-6.9 1.5-11 1.5-11-1.3-6.6 2.9-2.3 2.9-2.3 3.9 4.6 2.1 11 2.1 11-2.6 10.3 5.1 14.6 8.9 15.9"
24+
fill="currentColor"
25+
style={{
26+
transformOrigin: '130px 106px',
27+
}}
28+
className="octo-arm"
29+
/>
30+
<Path
31+
d="M115 115c-.1.1 3.7 1.5 4.8.4l13.9-13.8c3.2-2.4 6.2-3.2 8.5-3-8.4-10.6-14.7-24.2 1.6-40.6 4.7-4.6 10.2-6.8 15.9-7 .6-1.6 3.5-7.4 11.7-10.9 0 0 4.7 2.4 7.4 16.1 4.3 2.4 8.4 5.6 12.1 9.2 3.6 3.6 6.8 7.8 9.2 12.2 13.7 2.6 16.2 7.3 16.2 7.3-3.6 8.2-9.4 11.1-10.9 11.7-.3 5.8-2.4 11.2-7.1 15.9-16.4 16.4-30 10-40.6 1.6.2 2.8-1 6.8-5 10.8L141 136.5c-1.2 1.2.6 5.4.8 5.3z"
32+
fill="currentColor"
33+
className="octo-body"
34+
/>
35+
</Svg>
36+
);
37+
}
38+
39+
export default SvgComponent;

src/components/GithubIcon.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react';
2+
import { Linking, Platform, TouchableOpacity, View } from 'react-native';
3+
import Github from '../assets/Github';
4+
5+
export function GithubIcon() {
6+
const handleGithubIconPress = () => {
7+
Linking.openURL('https://github.com/mohit23x/reanimated-config-visualizer');
8+
};
9+
10+
if (Platform.OS !== 'web') return null;
11+
12+
return (
13+
<TouchableOpacity
14+
onPress={handleGithubIconPress}
15+
style={{ position: 'absolute', top: 0, right: 0, bottom: 0 }}
16+
>
17+
<Github />
18+
</TouchableOpacity>
19+
);
20+
}

yarn.lock

Lines changed: 4 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,10 +2390,10 @@
23902390
dependencies:
23912391
"@types/react" "*"
23922392

2393-
"@types/react@*":
2394-
version "17.0.15"
2395-
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.15.tgz#c7533dc38025677e312606502df7656a6ea626d0"
2396-
integrity sha512-uTKHDK9STXFHLaKv6IMnwp52fm0hwU+N89w/p9grdUqcFA6WuqDyPhaWopbNyE1k/VhgzmHl8pu1L4wITtmlLw==
2393+
"@types/react@*", "@types/react@^17.0.38":
2394+
version "17.0.50"
2395+
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.50.tgz#39abb4f7098f546cfcd6b51207c90c4295ee81fc"
2396+
integrity sha512-ZCBHzpDb5skMnc1zFXAXnL3l1FAdi+xZvwxK+PkglMmBrwjpp9nKaWuEvrGnSifCJmBFGxZOOFuwC6KH/s0NuA==
23972397
dependencies:
23982398
"@types/prop-types" "*"
23992399
"@types/scheduler" "*"
@@ -3496,52 +3496,6 @@ cacache@^12.0.2:
34963496
unique-filename "^1.1.1"
34973497
y18n "^4.0.0"
34983498

3499-
builtin-status-codes@^3.0.0:
3500-
version "3.0.0"
3501-
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
3502-
integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==
3503-
3504-
builtins@^1.0.3:
3505-
version "1.0.3"
3506-
resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88"
3507-
integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==
3508-
3509-
3510-
version "3.0.0"
3511-
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
3512-
integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=
3513-
3514-
3515-
version "3.1.0"
3516-
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
3517-
integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
3518-
3519-
3520-
version "3.1.2"
3521-
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
3522-
integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
3523-
3524-
cacache@^12.0.2:
3525-
version "12.0.4"
3526-
resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c"
3527-
integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==
3528-
dependencies:
3529-
bluebird "^3.5.5"
3530-
chownr "^1.1.1"
3531-
figgy-pudding "^3.5.1"
3532-
glob "^7.1.4"
3533-
graceful-fs "^4.1.15"
3534-
infer-owner "^1.0.3"
3535-
lru-cache "^5.1.1"
3536-
mississippi "^3.0.0"
3537-
mkdirp "^0.5.1"
3538-
move-concurrently "^1.0.1"
3539-
promise-inflight "^1.0.1"
3540-
rimraf "^2.6.3"
3541-
ssri "^6.0.1"
3542-
unique-filename "^1.1.1"
3543-
y18n "^4.0.0"
3544-
35453499
cacache@^15.0.5, cacache@^15.3.0:
35463500
version "15.3.0"
35473501
resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb"

0 commit comments

Comments
 (0)