UI: fix trivial bugs

This commit is contained in:
Fuma Nama
2024-11-24 17:23:45 +08:00
parent 12a3a0f432
commit 8e2cb31a95
3 changed files with 13 additions and 8 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-ui': patch
---
fix trivial bugs
+5 -1
View File
@@ -47,7 +47,11 @@ export type CodeBlockProps = HTMLAttributes<HTMLElement> & {
export const Pre = forwardRef<HTMLPreElement, HTMLAttributes<HTMLPreElement>>(
({ className, ...props }, ref) => {
return (
<pre ref={ref} className={cn('p-4', className)} {...props}>
<pre
ref={ref}
className={cn('p-4 focus-visible:outline-none', className)}
{...props}
>
{props.children}
</pre>
);
+3 -7
View File
@@ -48,14 +48,10 @@ const code = cva(
},
);
export function TypeTable({
type,
}: {
type: Record<string, ObjectType>;
}): React.ReactElement {
export function TypeTable({ type }: { type: Record<string, ObjectType> }) {
return (
<div className="overflow-auto whitespace-nowrap">
<table className="text-sm text-fd-muted-foreground">
<div className="prose my-6 overflow-auto prose-no-margin">
<table className="whitespace-nowrap text-sm text-fd-muted-foreground">
<thead>
<tr>
<th className="w-[45%]">Prop</th>