Skip to content

Commit e98fb8e

Browse files
committed
fix: minor fixes
1 parent 883fee5 commit e98fb8e

File tree

5 files changed

+95
-29
lines changed

5 files changed

+95
-29
lines changed

content/templates/index.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ description: Ready templates to quick start your project
55

66
A collection of open-source React templates curated by rCopy's creator. This list contains React, Next.js, Remix templates.
77
If you think it's missing a template, please [open an issue](https://github.com/mehdibha/rcopy/issues/new).
8+
9+
<DocsList name="templates" />

src/components/docs/docs-list.tsx

+20-19
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,27 @@ export const DocsList = ({ name, limit, className }: DocsListProps) => {
1818
const hasMore = limit ? docs.length > limit : false;
1919

2020
return (
21-
<div
22-
className={cn(
23-
"grid grid-cols-4 gap-4",
24-
{
25-
"grid-cols-3": type === "component" || type === "hook",
26-
"grid-cols-4": type === "block" || type === "template",
27-
},
28-
className
29-
)}
30-
>
31-
{docs.slice(0, limit).map((doc, index) => (
32-
<DocCard key={index} doc={doc} />
33-
))}
21+
<div>
22+
<div
23+
className={cn(
24+
"grid grid-cols-4 gap-4",
25+
{
26+
"grid-cols-3": type === "component" || type === "hook",
27+
"grid-cols-4": type === "block" || type === "template",
28+
},
29+
className
30+
)}
31+
>
32+
{docs.slice(0, limit).map((doc, index) => (
33+
<DocCard key={index} doc={doc} />
34+
))}
35+
</div>
3436
{hasMore && (
35-
<Link
36-
href={`/${name}`}
37-
className="flex cursor-pointer items-center justify-center rounded-md border border-border/20 bg-card/70 transition-colors duration-150 hover:border-border hover:bg-card"
38-
>
39-
Explore more
40-
</Link>
37+
<div className="flex justify-end">
38+
<Button size="sm" variant="link" className="mt-4 block">
39+
<Link href={`/${name}`}>Explore more</Link>
40+
</Button>
41+
</div>
4142
)}
4243
</div>
4344
);

src/components/marketing/explore.tsx

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { cn } from "@/lib/utils/classes";
2-
import { DocsList } from "../docs/docs-list";
1+
import { DocsList } from "@/components/docs/docs-list";
2+
import { IconsList } from "./icons-list";
33

44
export const Explore = ({ className }: { className: string }) => {
55
const categories = [
@@ -17,16 +17,19 @@ export const Explore = ({ className }: { className: string }) => {
1717
<h3 className="category-xl pl-6 font-mono text-xl tracking-widest text-muted-foreground">
1818
{category.title}
1919
</h3>
20-
<div
21-
className={cn(
22-
"border-l border-muted pb-8 pl-6 pt-4",
23-
index === categories.length - 1
24-
)}
25-
>
26-
<DocsList name={category.slug} limit={3} className="grid-cols-4" />
20+
<div className="border-l border-muted pb-8 pl-6 pt-4">
21+
<DocsList name={category.slug} limit={4} className="grid-cols-4" />
2722
</div>
2823
</div>
2924
))}
25+
<div>
26+
<h3 className="category-xl pl-6 font-mono text-xl tracking-widest text-muted-foreground">
27+
Icons
28+
</h3>
29+
<div className={"grid grid-cols-16 gap-2 border-l border-muted pb-1 pl-6 pt-4"}>
30+
<IconsList limit={32} />
31+
</div>
32+
</div>
3033
</div>
3134
</div>
3235
);

src/components/marketing/hero/animation.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export const Animation = () => {
138138
key={i}
139139
className="flex h-16 items-center justify-center rounded-md bg-card shadow"
140140
>
141-
<Icon size={30} />
141+
<Icon size={22} />
142142
</div>
143143
))}
144144
</div>
+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import React from "react";
2+
import {
3+
AlignCenterIcon,
4+
AtSignIcon,
5+
BarChart4Icon,
6+
BellIcon,
7+
BluetoothIcon,
8+
BoldIcon,
9+
CodeIcon,
10+
InboxIcon,
11+
LinkIcon,
12+
MailIcon,
13+
MoonIcon,
14+
PhoneIcon,
15+
ScreenShareIcon,
16+
SmileIcon,
17+
SparkleIcon,
18+
SunIcon,
19+
UserRoundIcon,
20+
Volume2Icon,
21+
ZapIcon,
22+
} from "lucide-react";
23+
24+
const icons = [
25+
CodeIcon,
26+
BellIcon,
27+
InboxIcon,
28+
MoonIcon,
29+
MailIcon,
30+
AtSignIcon,
31+
LinkIcon,
32+
AlignCenterIcon,
33+
BoldIcon,
34+
UserRoundIcon,
35+
BarChart4Icon,
36+
BluetoothIcon,
37+
ZapIcon,
38+
Volume2Icon,
39+
SunIcon,
40+
MoonIcon,
41+
SparkleIcon,
42+
SmileIcon,
43+
ScreenShareIcon,
44+
PhoneIcon,
45+
];
46+
47+
export const IconsList = ({ limit }: { limit?: number }) => {
48+
return (
49+
<>
50+
{icons.slice(0, limit ?? icons.length).map((Icon, i) => (
51+
<div
52+
key={i}
53+
className="flex h-16 items-center justify-center rounded-md bg-card shadow"
54+
>
55+
<Icon size={18} />
56+
</div>
57+
))}
58+
</>
59+
);
60+
};

0 commit comments

Comments
 (0)