Files
supabase/apps/docs/components/Params.tsx
Gildas Garcia 0395fd969f chore: upgrade react-markdown (#44913)
## Problem

We'd like to update react to `19` but many of our dependencies don't
support it.

## Solution

Update those dependencies. This PR focuses on `react-markdown`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Upgraded react-markdown to 10.1.0 (and remark-gfm to 4.0.0) across
projects for improved Markdown support.
* **Style**
* Adjusted Markdown rendering so typography and spacing are applied via
surrounding containers, improving consistent styling across docs and UI.
* **New Content**
  * Added a new RSS feed item for a recent blog post.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-16 09:12:43 +02:00

34 lines
1.1 KiB
TypeScript

import ReactMarkdown from 'react-markdown'
import { Badge } from 'ui'
type IParamProps = any
/**
* isPrimitive: Indicates whether the value is a basic type such as string or number. It does not refer to an object param.
* */
const Param = ({ name, isOptional, type, description, children, isPrimitive }: IParamProps) => {
return (
<div className="border-t border-b py-5 flex flex-col gap-3 debugger">
<div className="flex gap-3 items-center flex-wrap">
{!isPrimitive && (
<span className="text-sm text-foreground font-mono font-medium">{name ?? 'no-name'}</span>
)}
{isOptional ? (
<Badge variant="default">Optional</Badge>
) : (
<Badge variant="warning">Required</Badge>
)}
<span className="text-foreground-muted text-xs">{type ?? 'no type'}</span>
</div>
{description && (
<div className="text-sm text-foreground-lighter m-0">
<ReactMarkdown>{description}</ReactMarkdown>
</div>
)}
{children}
</div>
)
}
export default Param