mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 19:35:06 +03:00
feat: Parameters working, first attempt
This commit is contained in:
1 parent
27f6909988
commit
5a43f262e7
3 files changed
+7
-6
No files matched your search
@@ -37,7 +37,7 @@ import { ErrorCodes } from '../ui/ErrorCodes'
|
||||
import { McpConfigPanel } from '../ui/McpConfigPanel'
|
||||
|
||||
|
||||
import { RefDefinitionReturnType } from '~/features/docs/Reference.components.new'
|
||||
import { RefDefinitionReturnType, RefDefinitionParams } from '~/features/docs/Reference.components.new'
|
||||
|
||||
// Wrap Admonition for Docs-specific styling (within MDX prose, requires a margin-bottom)
|
||||
const AdmonitionWithMargin = (props: AdmonitionProps) => {
|
||||
@@ -45,6 +45,7 @@ const AdmonitionWithMargin = (props: AdmonitionProps) => {
|
||||
}
|
||||
|
||||
const components = {
|
||||
RefDefinitionParams,
|
||||
RefDefinitionReturnType,
|
||||
Accordion,
|
||||
AccordionItem,
|
||||
|
||||
@@ -170,9 +170,9 @@ export function FnParameterDetails({
|
||||
return (
|
||||
<div className={className ?? ''}>
|
||||
<h3 className="mb-3 text-base text-foreground">Parameters</h3>
|
||||
<ul>
|
||||
<ul className="not-prose">
|
||||
{combinedParameters.map((parameter, index) => (
|
||||
<li key={index} className="border-t last-of-type:border-b py-5 flex flex-col gap-3">
|
||||
<li key={index} className="not-prose border-t last-of-type:border-b py-5 flex flex-col gap-3">
|
||||
<ParamOrTypeDetails paramOrType={parameter} />
|
||||
</li>
|
||||
))}
|
||||
|
||||
@@ -48,9 +48,9 @@ function generateMdx(categories: ReturnType<typeof processSpec>): string {
|
||||
}
|
||||
}
|
||||
|
||||
// if (def.parameters?.length) {
|
||||
// lines.push(`<RefDefinitionParams parameters=${prop(def.parameters)} />`, "");
|
||||
// }
|
||||
if (def.parameters?.length) {
|
||||
lines.push(`<RefDefinitionParams parameters=${prop(def.parameters)} />`, "");
|
||||
}
|
||||
|
||||
if (def.returnType) {
|
||||
lines.push(`<RefDefinitionReturnType returnType=${prop(def.returnType)} />`, "");
|
||||
|
||||
Reference in new issue
Block a user