Skip to content

Commit 20dff18

Browse files
authored
add tools page (#1971)
1 parent 5253f4d commit 20dff18

6 files changed

Lines changed: 212 additions & 5 deletions

File tree

components/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function Button({ children, href, onPress, style, openInNewTab, ...rest }
2828
{isLink ? (
2929
<A
3030
href={href}
31-
style={{ borderRadius: 4, fontFamily: 'inherit' }}
31+
style={{ borderRadius: 4, fontFamily: 'inherit', fontSize: 'inherit' }}
3232
{...(openInNewTab ? { target: '_blank' } : {})}
3333
{...rest}>
3434
<Pressable focusable={false} style={linkStyle} accessible={false}>

components/Icons/index.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,3 +517,14 @@ export function ThemeDark({ width = 24, height = 24, fill = colors.black }: Icon
517517
</Svg>
518518
);
519519
}
520+
521+
export function Tools({ width = 24, height = 24, fill = colors.black }: IconProps) {
522+
return (
523+
<Svg width={width} height={height} viewBox="0 0 24 24" fill="none">
524+
<Path
525+
fill={fill}
526+
d="M14.501 2.1826C12.3317 2.70203 10.3412 4.64749 10.0265 6.55588C9.92493 7.17081 10.2516 7.60159 10.8197 7.60159C11.2884 7.60159 11.4135 7.45672 11.7829 6.48543C12.3782 4.92082 13.7886 3.86061 15.5094 3.68441C15.9876 3.63543 16.3787 3.64337 16.3787 3.70205C16.3787 3.76074 15.8518 4.29359 15.208 4.88608C13.4702 6.48515 13.092 7.52334 13.7708 8.83008C14.2353 9.72435 14.9597 10.2331 15.8749 10.3077C17.0637 10.4047 17.5348 10.1691 19.0694 8.71037L20.4518 7.39639L20.3774 8.23266C20.2857 9.26401 19.8753 10.2036 19.1438 11.0568C18.4852 11.8251 18.4541 12.3288 19.0452 12.6537C19.559 12.9359 19.9817 12.695 20.7602 11.6764C21.6906 10.4593 21.9935 9.56361 21.9999 8.012C22.0075 6.15546 21.6321 5.54957 20.4742 5.54957C20.0077 5.54957 19.8137 5.6917 18.326 7.12279C16.8616 8.53144 16.6389 8.69601 16.1971 8.69601C15.8294 8.69601 15.6298 8.60394 15.4152 8.33554C14.8635 7.64578 14.991 7.38367 16.638 5.82317C17.4717 5.03314 18.2239 4.25227 18.3094 4.08797C18.5651 3.59713 18.4881 3.11668 18.0826 2.67166C17.4829 2.01351 16.0333 1.81556 14.501 2.1826ZM3.02467 2.71092C2.77181 2.88029 2.43702 3.18836 2.28082 3.39576C1.78329 4.05624 1.9018 4.52382 3.00158 6.23932C4.2214 8.14196 4.55397 8.50668 5.25929 8.71448C5.70619 8.84622 5.90356 8.83733 6.34711 8.66591L6.88915 8.45661L8.98774 10.5257L11.0865 12.5949L10.8873 13.1421C10.327 14.6822 10.7732 15.8891 12.5188 17.5539C13.7698 18.7471 14.0907 18.8809 14.5705 18.4089C15.0465 17.9408 14.9132 17.6203 13.7538 16.4428C12.5014 15.1708 12.3451 14.9256 12.3451 14.2318C12.3451 13.3326 13.4739 12.5038 14.3967 12.7255C14.6388 12.7838 15.7322 13.7552 17.3772 15.3739C19.5481 17.5099 19.9906 18.0124 20.0676 18.4299C20.2074 19.1858 19.8155 19.8863 19.0718 20.2098C18.321 20.5365 17.9296 20.4459 17.1226 19.759C16.3943 19.1391 15.8198 19.0601 15.4825 19.5339C15.1638 19.9814 15.2063 20.1299 15.8509 20.8176C16.6638 21.6851 17.3473 22 18.4171 22C20.0227 22 21.3535 20.9273 21.685 19.3659C21.8198 18.7311 21.8068 18.4865 21.6015 17.7942C21.3699 17.0129 21.2325 16.849 18.6947 14.3279C17.2297 12.8724 15.7806 11.5513 15.4746 11.3921C14.8123 11.0472 13.4902 10.994 12.7856 11.2839L12.3221 11.4746L10.195 9.38577L8.06807 7.29707L8.28088 6.76396C8.54738 6.09677 8.35335 5.32849 7.78697 4.80851C7.17581 4.24721 4.10429 2.40312 3.78063 2.40312C3.61775 2.40312 3.27754 2.54156 3.02467 2.71092ZM5.42536 5.18211C6.17117 5.63425 6.78149 6.06818 6.78149 6.14657C6.78149 6.3422 5.9297 7.19119 5.73345 7.19119C5.60827 7.19119 4.56523 5.65572 3.79092 4.33134C3.6585 4.10507 3.58493 4.06677 5.42536 5.18211ZM5.16568 14.3391C2.28638 17.205 2.05243 17.526 2.05243 18.6142C2.05243 19.6782 2.76276 20.7949 3.76978 21.3138C4.51099 21.6958 5.80466 21.72 6.50331 21.365C6.77106 21.229 7.81952 20.309 8.83307 19.3206C10.7763 17.4256 10.9328 17.1567 10.3978 16.6305C9.88223 16.1234 9.60377 16.2736 7.76708 18.0504C6.8043 18.9819 5.86906 19.8186 5.68894 19.9098C4.86789 20.3254 3.72151 19.5508 3.72151 18.5804C3.72151 18.1249 3.92069 17.8913 6.43377 15.3993C9.26536 12.5914 9.41182 12.3775 8.86784 11.8425C8.30105 11.285 8.09325 11.4252 5.16568 14.3391Z"
527+
/>
528+
</Svg>
529+
);
530+
}

components/Library/Thumbnail.web.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ function Thumbnail({ url }: Props) {
2727

2828
const iconFill = isDark
2929
? showPreview
30-
? colors.primary
30+
? colors.primaryDark
3131
: darkColors.pewter
3232
: showPreview
33-
? colors.primary
33+
? colors.primaryDark
3434
: undefined;
3535

3636
return (

components/TopBar.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import NavigationTab from '~/components/NavigationTab';
99
import CustomAppearanceContext from '~/context/CustomAppearanceContext';
1010

1111
import { Button } from './Button';
12-
import { GitHub, Logo, Plus, ThemeDark, ThemeLight } from './Icons';
12+
import { GitHub, Logo, Plus, ThemeDark, ThemeLight, Tools } from './Icons';
1313
import Tooltip from './Tooltip';
1414

1515
export default function TopBar() {
@@ -67,6 +67,19 @@ export default function TopBar() {
6767
}>
6868
Toggle theme
6969
</Tooltip>
70+
<Tooltip
71+
trigger={
72+
<View>
73+
<Button
74+
aria-label="Tools"
75+
href="/tools"
76+
style={[styles.button, styles.themeButtonSmall]}>
77+
<Tools fill={colors.white} />
78+
</Button>
79+
</View>
80+
}>
81+
Tools
82+
</Tooltip>
7083
<Tooltip
7184
trigger={
7285
<View style={{ marginRight: 4 }}>

pages/scoring.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const Scoring = () => {
2929
<PageMeta
3030
title="Scoring"
3131
description="What are the Directory Score and Trending Score and how they are calculated"
32-
path="popular"
32+
path="scoring"
3333
/>
3434
<Navigation
3535
title="Scoring"

pages/tools.tsx

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
import { useContext } from 'react';
2+
import { StyleSheet, View } from 'react-native';
3+
4+
import { colors, darkColors, H3, P } from '~/common/styleguide';
5+
import { Button } from '~/components/Button';
6+
import ContentContainer from '~/components/ContentContainer';
7+
import { GitHub } from '~/components/Icons';
8+
import Navigation from '~/components/Navigation';
9+
import PageMeta from '~/components/PageMeta';
10+
import CustomAppearanceContext from '~/context/CustomAppearanceContext';
11+
12+
const Tools = () => {
13+
const { isDark } = useContext(CustomAppearanceContext);
14+
const textColorStyle = {
15+
color: isDark ? colors.gray2 : colors.black,
16+
};
17+
18+
const primaryButtonColorStyle = {
19+
backgroundColor: isDark ? darkColors.primaryDark : colors.primary,
20+
};
21+
const buttonColorStyle = {
22+
backgroundColor: isDark ? darkColors.border : colors.gray3,
23+
color: isDark ? colors.white : colors.black,
24+
};
25+
26+
return (
27+
<>
28+
<PageMeta
29+
title="Tools"
30+
description="List of development tools, apps and websites using React Native Directory data."
31+
path="tools"
32+
/>
33+
<Navigation
34+
title="Tools"
35+
description="List of development tools, apps and websites using React Native Directory data."
36+
/>
37+
<ContentContainer style={styles.container}>
38+
<H3 style={[styles.subHeader, textColorStyle]}>React Native Directory VS Code extension</H3>
39+
<P style={[styles.paragraph, textColorStyle]}>
40+
Browse through the React Native Directory and perform actions related to the chosen
41+
package inside the built-in editor Command Palette.
42+
</P>
43+
<View style={styles.buttonsContainer}>
44+
<Button
45+
openInNewTab
46+
href="https://github.com/react-native-community/vscode-react-native-directory"
47+
style={[styles.button, primaryButtonColorStyle]}>
48+
<GitHub width={16} /> <span>GitHub</span>
49+
</Button>
50+
<Button
51+
openInNewTab
52+
href="https://marketplace.visualstudio.com/items?itemName=react-native-directory.vscode-react-native-directory"
53+
style={[styles.button, buttonColorStyle]}>
54+
<span>Visual Studio Marketplace</span>
55+
</Button>
56+
<Button
57+
openInNewTab
58+
href="https://open-vsx.org/extension/react-native-directory/vscode-react-native-directory"
59+
style={[styles.button, buttonColorStyle]}>
60+
<span>Open VSX</span>
61+
</Button>
62+
</View>
63+
<H3 style={[styles.subHeader, textColorStyle]}>React Native Directory Raycast extension</H3>
64+
<P style={[styles.paragraph, textColorStyle]}>
65+
A searchable and filterable list of React Native libraries inside Raycast.
66+
</P>
67+
<View style={styles.buttonsContainer}>
68+
<Button
69+
openInNewTab
70+
href="https://github.com/raycast/extensions/tree/main/extensions/react-native-directory"
71+
style={[styles.button, primaryButtonColorStyle]}>
72+
<GitHub width={16} /> <span>GitHub</span>
73+
</Button>
74+
<Button
75+
openInNewTab
76+
href="https://www.raycast.com/shubh_porwal/react-native-directory"
77+
style={[styles.button, buttonColorStyle]}>
78+
<span>Raycast Store</span>
79+
</Button>
80+
</View>
81+
<H3 style={[styles.subHeader, textColorStyle]}>expo-doctor</H3>
82+
<P style={[styles.paragraph, textColorStyle]}>
83+
CLI to check your Expo project for known issues and used libraries compatibility.
84+
</P>
85+
<View style={styles.buttonsContainer}>
86+
<Button
87+
openInNewTab
88+
href="https://github.com/expo/expo/tree/main/packages/expo-doctor"
89+
style={[styles.button, primaryButtonColorStyle]}>
90+
<GitHub width={16} /> <span>GitHub</span>
91+
</Button>
92+
<Button
93+
openInNewTab
94+
href="https://www.npmjs.com/package/expo-doctor"
95+
style={[styles.button, buttonColorStyle]}>
96+
<span>npm Registry</span>
97+
</Button>
98+
</View>
99+
<H3 style={[styles.subHeader, textColorStyle]}>React Native Package Checker</H3>
100+
<P style={[styles.paragraph, textColorStyle]}>
101+
Analyze React Native packages for New Architecture compatibility, check multiple packages
102+
at once, get detailed insights, and export reports.
103+
</P>
104+
<View style={styles.buttonsContainer}>
105+
<Button
106+
openInNewTab
107+
href="https://github.com/sandipshiwakoti/react-native-package-checker"
108+
style={[styles.button, primaryButtonColorStyle]}>
109+
<GitHub width={16} /> <span>GitHub</span>
110+
</Button>
111+
<Button
112+
openInNewTab
113+
href="https://react-native-package-checker.vercel.app/"
114+
style={[styles.button, buttonColorStyle]}>
115+
<span>Website</span>
116+
</Button>
117+
</View>{' '}
118+
<H3 style={[styles.subHeader, textColorStyle]}>
119+
React Native Package Checker VS Code Extension
120+
</H3>
121+
<P style={[styles.paragraph, textColorStyle]}>
122+
Check New Architecture compatibility and version requirements for React Native packages
123+
inside VS Code.
124+
</P>
125+
<View style={styles.buttonsContainer}>
126+
<Button
127+
openInNewTab
128+
href="https://github.com/sandipshiwakoti/vscode-react-native-package-checker"
129+
style={[styles.button, primaryButtonColorStyle]}>
130+
<GitHub width={16} /> <span>GitHub</span>
131+
</Button>
132+
<Button
133+
openInNewTab
134+
href="https://marketplace.visualstudio.com/items?itemName=sandipshiwakoti.vscode-react-native-package-checker"
135+
style={[styles.button, buttonColorStyle]}>
136+
<span>Visual Studio Marketplace</span>
137+
</Button>
138+
<Button
139+
openInNewTab
140+
href="https://open-vsx.org/extension/sandipshiwakoti/vscode-react-native-package-checker"
141+
style={[styles.button, buttonColorStyle]}>
142+
<span>Open VSX</span>
143+
</Button>
144+
</View>
145+
<br />
146+
<br />
147+
</ContentContainer>
148+
</>
149+
);
150+
};
151+
152+
const styles = StyleSheet.create({
153+
container: {
154+
marginTop: 32,
155+
paddingHorizontal: 16,
156+
},
157+
subHeader: {
158+
fontSize: 22,
159+
marginTop: 16,
160+
marginBottom: 12,
161+
},
162+
paragraph: {
163+
fontSize: 17,
164+
lineHeight: 29,
165+
marginBottom: 17,
166+
fontWeight: 300,
167+
},
168+
buttonsContainer: {
169+
flexDirection: 'row',
170+
flexWrap: 'wrap',
171+
gap: 12,
172+
marginBottom: 24,
173+
},
174+
button: {
175+
flexDirection: 'row',
176+
paddingHorizontal: 12,
177+
minHeight: 32,
178+
fontSize: 14,
179+
gap: 2,
180+
},
181+
});
182+
183+
export default Tools;

0 commit comments

Comments
 (0)