Skip to content

Commit 3912011

Browse files
authored
list rn-directory CLI on tools page, small tweaks (#2283)
1 parent 732d2ac commit 3912011

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

components/Tools/GitHubButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function GitHubButton({ href }: Props) {
1212
<Button
1313
openInNewTab
1414
href={href}
15-
style={tw`min-h-8 flex-row gap-1.5 bg-primary px-3 text-sm dark:bg-primary-dark`}>
15+
style={tw`min-h-8 flex-row gap-1.5 bg-primary-dark px-3 text-sm`}>
1616
<GitHub width={16} style={tw`text-black`} />
1717
<P style={tw`text-sm text-black`}>GitHub</P>
1818
</Button>

components/Tools/ToolEntry.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { type ReactNode } from 'react';
12
import { View } from 'react-native';
23

34
import { H3, P } from '~/common/styleguide';
@@ -8,7 +9,7 @@ import GitHubButton from './GitHubButton';
89

910
type Props = {
1011
name: string;
11-
description: string;
12+
description: ReactNode;
1213
githubUrl: string;
1314
buttons: {
1415
label: string;
@@ -19,8 +20,8 @@ type Props = {
1920
export default function ToolEntry({ name, description, githubUrl, buttons }: Props) {
2021
return (
2122
<View style={tw`rounded-xl border border-default px-5 py-4`}>
22-
<H3 style={tw`mb-0.5 text-xl`}>{name}</H3>
23-
<P style={tw`mb-3 font-light leading-[29px]`}>{description}</P>
23+
<H3 style={tw`mb-1 text-xl`}>{name}</H3>
24+
<P style={tw`mb-3 font-light leading-[23px]`}>{description}</P>
2425
<View style={tw`flex-row flex-wrap gap-3`}>
2526
<GitHubButton href={githubUrl} />
2627
{buttons.map(({ label, href }) => (

pages/tools.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,27 @@ export default function Tools() {
1717
description="List of development tools, apps and websites using React Native Directory data."
1818
/>
1919
<ContentContainer style={tw`my-10 gap-4 px-4`}>
20+
<ToolEntry
21+
name="React Native Directory CLI"
22+
description={
23+
<span>
24+
Propose new entries to React Native Directory directly from your terminal. The{' '}
25+
<code
26+
style={tw`rounded-sm bg-palette-gray2 p-0.5 px-1 text-[90%] dark:bg-palette-gray6`}>
27+
rn-directory
28+
</code>{' '}
29+
CLI gathers the required information manually or automatically, creates a fork, and
30+
opens a pull request on behalf of the user currently logged in to the GitHub CLI.
31+
</span>
32+
}
33+
githubUrl="https://github.com/Simek/rn-directory"
34+
buttons={[
35+
{
36+
label: 'npm Registry',
37+
href: 'https://www.npmjs.com/package/rn-directory',
38+
},
39+
]}
40+
/>
2041
<ToolEntry
2142
name="React Native Directory VS Code extension"
2243
description="Browse through the React Native Directory and perform actions related to the chosen package inside the built-in editor Command Palette."

scenes/PackageScoreScene.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useMemo } from 'react';
22
import { View } from 'react-native';
33

4-
import { A, Caption, H6, useLayout } from '~/common/styleguide';
4+
import { A, Caption, H6Section, useLayout } from '~/common/styleguide';
55
import ContentContainer from '~/components/ContentContainer';
66
import { DirectoryScore } from '~/components/Library/DirectoryScore';
77
import DetailsNavigation from '~/components/Package/DetailsNavigation';
@@ -42,7 +42,7 @@ export default function PackageScoreScene({ apiData, packageName }: PackageScore
4242
isSmallScreen && tw`flex-col px-5`,
4343
]}>
4444
<View style={tw`items-center`}>
45-
<H6 style={tw`mb-3`}>Directory score</H6>
45+
<H6Section style={tw`mb-3`}>Directory score</H6Section>
4646
<DirectoryScore score={library.score} sizeMultiplier={2} />
4747
<span style={tw`mt-1 flex items-center text-[24px] font-semibold text-primary-dark`}>
4848
{library.score}/100
@@ -67,7 +67,7 @@ export default function PackageScoreScene({ apiData, packageName }: PackageScore
6767
</Caption>
6868
</View>
6969
</View>
70-
<H6 style={tw`text-secondary`}>Matching criteria</H6>
70+
<H6Section style={tw`text-secondary`}>Matching criteria</H6Section>
7171
<View>
7272
{SCORING_CRITERIONS.filter(({ name }) =>
7373
library.matchingScoreModifiers.includes(name)
@@ -77,7 +77,7 @@ export default function PackageScoreScene({ apiData, packageName }: PackageScore
7777
</ScoringCriterion>
7878
))}
7979
</View>
80-
<H6 style={tw`text-secondary`}>Not matched criteria</H6>
80+
<H6Section style={tw`text-secondary`}>Not matched criteria</H6Section>
8181
<View>
8282
{SCORING_CRITERIONS.filter(
8383
({ name }) => !library.matchingScoreModifiers.includes(name)

0 commit comments

Comments
 (0)