Skip to content

Commit ac67ae1

Browse files
kylemclarenclaude
andcommitted
Consolidate React components and add Astro wrappers
- Move PixelBlast.tsx and StarBorder.tsx from src/components/ to src/components/react/ - Add Astro wrappers for all React components that were missing them: - APIBody, AnimatedList, Callout, DotPattern, Param, ParamTable, Snippet, StatusBadge, StatusCodes - Update all MDX files to import from Astro wrappers instead of @/components/react - Update 404.astro and SearchDialog.tsx imports This ensures consistent component organization: - All React components live in src/components/react/ - All components used in MDX have Astro wrappers in src/components/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent df2f166 commit ac67ae1

23 files changed

+140
-12
lines changed

src/components/APIBody.astro

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
import { APIBody as APIBodyReact } from './react/APIEndpoint';
3+
4+
interface Props {
5+
title: string;
6+
}
7+
8+
const props = Astro.props;
9+
---
10+
11+
<APIBodyReact {...props} client:load><slot /></APIBodyReact>

src/components/AnimatedList.astro

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
import { AnimatedList as AnimatedListReact } from './react/AnimatedList';
3+
4+
interface Props {
5+
items: (string | { id: string; content: unknown })[];
6+
showGradients?: boolean;
7+
enableArrowNavigation?: boolean;
8+
className?: string;
9+
itemClassName?: string;
10+
displayScrollbar?: boolean;
11+
initialSelectedIndex?: number;
12+
}
13+
14+
const props = Astro.props;
15+
---
16+
17+
<AnimatedListReact {...props} client:load />

src/components/Callout.astro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
import { Callout as CalloutReact } from './react/Callout';
3+
4+
interface Props {
5+
type?: 'info' | 'warning' | 'danger' | 'tip';
6+
title?: string;
7+
}
8+
9+
const props = Astro.props;
10+
---
11+
12+
<CalloutReact {...props} client:load><slot /></CalloutReact>

src/components/DotPattern.astro

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
import { DotPattern as DotPatternReact } from './react/DotPattern';
3+
4+
interface Props {
5+
width?: number;
6+
height?: number;
7+
x?: number;
8+
y?: number;
9+
cx?: number;
10+
cy?: number;
11+
cr?: number;
12+
className?: string;
13+
glow?: boolean;
14+
}
15+
16+
const props = Astro.props;
17+
---
18+
19+
<DotPatternReact {...props} client:load />

src/components/Param.astro

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
import { Param as ParamReact } from './react/ParamTable';
3+
4+
interface Props {
5+
name: string;
6+
type: 'string' | 'integer' | 'boolean' | 'object' | 'array' | 'number';
7+
required?: boolean;
8+
default?: string;
9+
description: string;
10+
}
11+
12+
const props = Astro.props;
13+
---
14+
15+
<ParamReact {...props} client:load><slot /></ParamReact>

src/components/ParamTable.astro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
import { ParamTable as ParamTableReact } from './react/ParamTable';
3+
4+
const props = Astro.props;
5+
---
6+
7+
<ParamTableReact {...props} client:load><slot /></ParamTableReact>

src/components/Snippet.astro

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
import { Snippet as SnippetReact } from './react/CodeTabs';
3+
4+
interface Props {
5+
name: string;
6+
}
7+
8+
const props = Astro.props;
9+
---
10+
11+
<SnippetReact {...props} client:load><slot /></SnippetReact>

src/components/StatusBadge.astro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
import { StatusBadge as StatusBadgeReact } from './react/StatusCodes';
3+
4+
interface Props {
5+
code: number;
6+
label?: string;
7+
}
8+
9+
const props = Astro.props;
10+
---
11+
12+
<StatusBadgeReact {...props} client:load />

src/components/StatusCodes.astro

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
import { StatusCodes as StatusCodesReact } from './react/StatusCodes';
3+
4+
interface StatusCode {
5+
code: number;
6+
label: string;
7+
description?: string;
8+
}
9+
10+
interface Props {
11+
codes: StatusCode[];
12+
columns?: 2 | 3 | 4;
13+
}
14+
15+
const props = Astro.props;
16+
---
17+
18+
<StatusCodesReact {...props} client:load />

0 commit comments

Comments
 (0)