mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
OpenAPI: Fix display on property components
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-openapi': patch
|
||||
---
|
||||
|
||||
Fix `display` on property components
|
||||
@@ -2,6 +2,10 @@ import { createSourceAuto } from '@fumadocs/mdx-remote/github';
|
||||
import { loader } from 'fumadocs-core/source';
|
||||
import { cache } from 'react';
|
||||
|
||||
const token = process.env.GITHUB_TOKEN;
|
||||
|
||||
if (!token) throw new Error('`GITHUB_TOKEN` is missing');
|
||||
|
||||
export const getDocs = cache(async () => {
|
||||
return loader({
|
||||
source: await createSourceAuto({
|
||||
@@ -10,7 +14,7 @@ export const getDocs = cache(async () => {
|
||||
repo: 'fumadocs',
|
||||
directory: 'examples/remote-mdx/content',
|
||||
treeSha: 'dev',
|
||||
accessToken: process.env.GITHUB_TOKEN ?? '',
|
||||
accessToken: token,
|
||||
},
|
||||
}),
|
||||
rootDir: 'docs',
|
||||
|
||||
@@ -88,8 +88,8 @@ export function Property({
|
||||
children,
|
||||
}: PropertyProps): React.ReactElement {
|
||||
return (
|
||||
<div className="mb-4 flex flex-col rounded-lg border bg-fd-card p-3 prose-no-margin">
|
||||
<h4 className="inline-flex items-center gap-4">
|
||||
<div className="mb-4 rounded-lg border bg-fd-card p-3 prose-no-margin">
|
||||
<h4 className="flex flex-row items-center gap-4">
|
||||
<code>{name}</code>
|
||||
{required ? (
|
||||
<div className={cn(badgeVariants({ color: 'red' }))}>Required</div>
|
||||
|
||||
Reference in New Issue
Block a user