mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
refactor: docs design (#8487)
This commit is contained in:
@@ -2,12 +2,7 @@ import { HyperlinkedText } from './HyperlinkedText';
|
||||
import { Table } from './Table';
|
||||
import type { ParameterDocumentation } from '~/util/parse.server';
|
||||
|
||||
interface ParameterDetailProps {
|
||||
data: ParameterDocumentation[];
|
||||
className?: string | undefined;
|
||||
}
|
||||
|
||||
export function ParameterTable({ data, className }: ParameterDetailProps) {
|
||||
export function ParameterTable({ data }: { data: ParameterDocumentation[] }) {
|
||||
const rows = data.map((param) => ({
|
||||
Name: param.name,
|
||||
Type: <HyperlinkedText tokens={param.tokens} />,
|
||||
@@ -20,12 +15,5 @@ export function ParameterTable({ data, className }: ParameterDetailProps) {
|
||||
Type: 'font-mono',
|
||||
};
|
||||
|
||||
return (
|
||||
<Table
|
||||
className={className}
|
||||
columns={['Name', 'Type', 'Optional', 'Description']}
|
||||
rows={rows}
|
||||
columnStyles={columnStyles}
|
||||
/>
|
||||
);
|
||||
return <Table columns={['Name', 'Type', 'Optional', 'Description']} rows={rows} columnStyles={columnStyles} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user