mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
feat(website): add detailed property and method documentation (#8252)
Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { DocContainer } from '../DocContainer';
|
||||
import { MethodList } from '../MethodList';
|
||||
import { PropertyList } from '../PropertyList';
|
||||
import { Separator } from '../Seperator';
|
||||
import type { DocClass } from '~/DocModel/DocClass';
|
||||
|
||||
export interface ClassProps {
|
||||
@@ -17,8 +18,19 @@ export function Class({ data }: ClassProps) {
|
||||
typeParams={data.typeParameterData}
|
||||
>
|
||||
<>
|
||||
{data.properties.length ? <PropertyList data={data.properties} /> : null}
|
||||
{data.methods.length ? <MethodList data={data.methods} /> : null}
|
||||
{data.properties.length ? (
|
||||
<>
|
||||
<PropertyList data={data.properties} />
|
||||
<Separator />
|
||||
</>
|
||||
) : null}
|
||||
|
||||
{data.methods.length ? (
|
||||
<>
|
||||
<MethodList data={data.methods} />
|
||||
<Separator />
|
||||
</>
|
||||
) : null}
|
||||
</>
|
||||
</DocContainer>
|
||||
);
|
||||
|
||||
@@ -15,6 +15,7 @@ export function Function({ data }: FunctionProps) {
|
||||
summary={data.summary}
|
||||
typeParams={data.typeParameterData}
|
||||
>
|
||||
<h2>Parameters</h2>
|
||||
<ParameterTable data={data.parameters} />
|
||||
</DocContainer>
|
||||
);
|
||||
|
||||
@@ -13,8 +13,6 @@ export function TypeAlias({ data }: TypeAliasProps) {
|
||||
excerpt={data.excerpt}
|
||||
summary={data.summary}
|
||||
typeParams={data.typeParameterData}
|
||||
>
|
||||
<div>WIP</div>
|
||||
</DocContainer>
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user