Files
Enes Gules 6d777619c2 Add Docs7 documentation and component guides (#3024)
Co-authored-by: Context7 Agent <docs-agent@context7.com>
Co-authored-by: Josh <josh@upstash.com>
Co-authored-by: context7[bot] <236830434+context7[bot]@users.noreply.github.com>
2026-09-02 18:14:37 +03:00

27 lines
558 B
Plaintext

---
title: React components
description: Define a small custom component in MDX
---
Define the component with an ESM export, then use it in the page.
## Usage
```mdx
export const Status = ({ children }) => (
<Badge color="green">{children}</Badge>
)
The API is <Status>ready</Status>.
```
Keep custom components small. Use a shared MDX or JSX snippet when several pages need the same component.
## Example
export const ExampleStatus = ({ children }) => (
<Badge color="green">{children}</Badge>
)
The API is <ExampleStatus>ready</ExampleStatus>.