docs(site): add ui-next component documentation and upgrade Docusaurus (#6102)
This commit is contained in:
1 parent
03b180f185
commit
ac45a9497f
112 files changed
+9665
-6674
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import React from 'react';
|
||||
|
||||
export interface PropDef {
|
||||
name: string;
|
||||
type: string;
|
||||
default: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
interface PropsTableProps {
|
||||
props: PropDef[];
|
||||
}
|
||||
|
||||
export default function PropsTable({ props }: PropsTableProps) {
|
||||
const {
|
||||
Table,
|
||||
TableHeader,
|
||||
TableBody,
|
||||
TableHead,
|
||||
TableRow,
|
||||
TableCell,
|
||||
} = require('../../../../../ui-next/src/components/Table');
|
||||
|
||||
return (
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead className="text-foreground font-medium">Prop</TableHead>
|
||||
<TableHead className="text-foreground font-medium">Type</TableHead>
|
||||
<TableHead className="text-foreground font-medium">Default</TableHead>
|
||||
<TableHead className="text-foreground font-medium">Description</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{props.map(prop => (
|
||||
<TableRow key={prop.name}>
|
||||
<TableCell className="font-mono text-base text-foreground">{prop.name}</TableCell>
|
||||
<TableCell className="font-mono text-base">{prop.type}</TableCell>
|
||||
<TableCell className="font-mono text-base">{prop.default}</TableCell>
|
||||
<TableCell>{prop.description}</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user