+ Readme.md
++ {props.children} ++ ), + }} + rehypePlugins={[rehypeRaw, rehypeSanitize]} + remarkPlugins={[remarkGfm]}> + {readmeContent} +
Loading README.md…
+ )} +
+ {code}
+
+ );
+ }
+
+ return highlighter;
+}
diff --git a/components/Icons/index.tsx b/components/Icons/index.tsx
index a60a0afd..f2983259 100644
--- a/components/Icons/index.tsx
+++ b/components/Icons/index.tsx
@@ -528,3 +528,11 @@ export function Tools({ width = 24, height = 24, fill = colors.black }: IconProp
);
}
+
+export function ReadmeFile({ width = 24, height = 24, fill = colors.black }: IconProps) {
+ return (
+
+ );
+}
diff --git a/components/Libraries.tsx b/components/Libraries.tsx
index 502463f6..3c26675e 100644
--- a/components/Libraries.tsx
+++ b/components/Libraries.tsx
@@ -1,8 +1,8 @@
import dynamic from 'next/dynamic';
-import { Image, StyleSheet, View } from 'react-native';
+import { StyleSheet, View } from 'react-native';
-import { H3, A, P } from '~/common/styleguide';
import LoadingContent from '~/components/Library/LoadingContent';
+import NotFoundContent from '~/components/NotFoundContent';
import { type LibraryType } from '~/types';
type Props = {
@@ -15,18 +15,7 @@ const LibraryWithLoading = dynamic(() => import('~/components/Library'), {
export default function Libraries({ libraries }: Props) {
if (!libraries || !libraries.length) {
- return (
- - Want to contribute a library you like? Submit a PR to the{' '} - GitHub Repo - . -
-TypeScript Types
, } : null, - examples && examples.length + !skipExamples && examples && examples.length ? { id: 'examples', icon:,
@@ -224,11 +229,11 @@ function generateSecondaryData(library: LibraryType, isDark: boolean): MetadataE
];
}
-export function MetaData({ library, secondary }: Props) {
+export function MetaData({ library, secondary, skipExamples = false }: Props) {
const { isDark } = useContext(CustomAppearanceContext);
if (secondary) {
- const data = generateSecondaryData(library, isDark).filter(Boolean);
+ const data = generateSecondaryData(library, isDark, skipExamples).filter(Boolean);
return (
<>
{data
diff --git a/components/Library/RecommendedLabel.tsx b/components/Library/RecommendedLabel.tsx
deleted file mode 100644
index ee44174d..00000000
--- a/components/Library/RecommendedLabel.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import { useContext } from 'react';
-import { StyleSheet, View } from 'react-native';
-
-import { colors, darkColors, Label } from '~/common/styleguide';
-import CustomAppearanceContext from '~/context/CustomAppearanceContext';
-
-import { Badge } from '../Icons';
-
-type Props = {
- isSmallScreen?: boolean;
-};
-
-function RecommendedLabel({ isSmallScreen }: Props) {
- const { isDark } = useContext(CustomAppearanceContext);
- return (
- + Want to contribute a library you like? Submit a PR to the{' '} + GitHub Repo. +
+ {bottomSlot} +{library.npm?.latestRelease ?? registryData.version}
+{name}
+ +