Skip to content

Commit 655aa17

Browse files
committed
Rename to CopyBlock
1 parent ce98aa0 commit 655aa17

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

app/(home)/clickable-code-block.tsx renamed to app/(home)/copy-block.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface ShellCommandProps {
99
children: ReactNode
1010
}
1111

12-
export const ClickableCodeBlock: FC<ShellCommandProps> = ({ className, children }) => {
12+
export const CopyBlock: FC<ShellCommandProps> = ({ className, children }) => {
1313
const [copied, setCopied] = useState(false)
1414
const commandRef = useRef<HTMLElement>(null)
1515

@@ -93,3 +93,4 @@ export const ClickableCodeBlock: FC<ShellCommandProps> = ({ className, children
9393
)
9494
}
9595

96+

app/(home)/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Link from 'next/link';
2-
import { ClickableCodeBlock } from './clickable-code-block';
2+
import { CopyBlock } from './copy-block';
33
import { ConsoleCarousel } from './console-carousel';
44
import { consoleScreens } from './console-screens';
55
import { ScreenshotCarousel } from './screenshot-carousel';
@@ -47,7 +47,7 @@ export default function HomePage() {
4747
{/* Quick Install */}
4848
<div className="mt-12 mx-auto max-w-3xl rounded-lg bg-muted">
4949
<h3 className="font-semibold mb-4">Quick Install</h3>
50-
<ClickableCodeBlock>pip install llms-py</ClickableCodeBlock>
50+
<CopyBlock>pip install llms-py</CopyBlock>
5151
</div>
5252

5353
{/* Console Carousel Section */}
@@ -59,7 +59,7 @@ export default function HomePage() {
5959

6060
<div className="mt-12 mx-auto max-w-3xl rounded-lg bg-muted">
6161
<h3 className="font-semibold my-4">Run Server</h3>
62-
<ClickableCodeBlock>llms --serve 8000</ClickableCodeBlock>
62+
<CopyBlock>llms --serve 8000</CopyBlock>
6363
</div>
6464
</div>
6565

mdx-components.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import defaultMdxComponents from 'fumadocs-ui/mdx';
22
import { Steps, Step } from 'fumadocs-ui/components/steps';
3-
import { ClickableCodeBlock } from '@/app/(home)/clickable-code-block';
3+
import { CopyBlock } from '@/app/(home)/copy-block';
44
import type { MDXComponents } from 'mdx/types';
55

66
export function getMDXComponents(components?: MDXComponents): MDXComponents {
77
return {
88
...defaultMdxComponents,
99
Steps,
1010
Step,
11-
ShellCommand: ClickableCodeBlock,
11+
ShellCommand: CopyBlock,
1212
...components,
1313
};
1414
}

0 commit comments

Comments
 (0)