mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
OpenAPI: Fix minor UI bugs
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-openapi': patch
|
||||
---
|
||||
|
||||
Fix minor UI bugs
|
||||
@@ -166,6 +166,8 @@ export const defaultAdapters = {
|
||||
s.push('mp := multipart.NewWriter(payload)');
|
||||
|
||||
for (const [key, value] of Object.entries(data.body as object)) {
|
||||
if (!value) continue;
|
||||
|
||||
const escaped = escapeString(
|
||||
inputToString(value, 'application/json'),
|
||||
'`',
|
||||
|
||||
@@ -359,9 +359,11 @@ function SecurityTabs({
|
||||
{securities.map((security, i) => (
|
||||
<SelectItem key={i} value={i.toString()}>
|
||||
{security.map((item) => (
|
||||
<div key={item.id}>
|
||||
<div key={item.id} className="max-w-[600px]">
|
||||
<p className="font-mono font-medium">{item.id}</p>
|
||||
<p className="text-fd-muted-foreground">{item.description}</p>
|
||||
<p className="text-fd-muted-foreground whitespace-pre-wrap">
|
||||
{item.description}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</SelectItem>
|
||||
|
||||
@@ -266,12 +266,22 @@ export function FieldInput({
|
||||
className={cn(
|
||||
buttonVariants({
|
||||
color: 'secondary',
|
||||
size: 'sm',
|
||||
className: 'w-full',
|
||||
className: 'w-full h-9 gap-2 truncate',
|
||||
}),
|
||||
)}
|
||||
>
|
||||
{value ? (value as File).name : 'Upload'}
|
||||
{value instanceof File ? (
|
||||
<>
|
||||
<span className="text-fd-muted-foreground text-xs">
|
||||
Selected
|
||||
</span>
|
||||
<span className="truncate w-0 flex-1 text-end">
|
||||
{value.name}
|
||||
</span>
|
||||
</>
|
||||
) : (
|
||||
<span className="text-fd-muted-foreground">Upload</span>
|
||||
)}
|
||||
</label>
|
||||
<input
|
||||
id={fieldName}
|
||||
|
||||
@@ -23,7 +23,7 @@ const SelectTrigger = forwardRef<
|
||||
>
|
||||
{children}
|
||||
<SelectPrimitive.Icon asChild>
|
||||
<ChevronDown className="ms-auto size-3.5 text-fd-muted-foreground" />
|
||||
<ChevronDown className="ms-auto size-3.5 text-fd-muted-foreground shrink-0" />
|
||||
</SelectPrimitive.Icon>
|
||||
</SelectPrimitive.Trigger>
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user