mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
feat(website): render tsdoc examples (#8494)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Group, Stack, Title } from '@mantine/core';
|
||||
import { CommentSection } from './Comment';
|
||||
import { HyperlinkedText } from './HyperlinkedText';
|
||||
import { ParameterTable } from './ParameterTable';
|
||||
import { TSDoc } from './tsdoc/TSDoc';
|
||||
import type { DocMethod } from '~/DocModel/DocMethod';
|
||||
import type { DocMethodSignature } from '~/DocModel/DocMethodSignature';
|
||||
|
||||
@@ -32,7 +32,8 @@ export function MethodItem({ data }: { data: MethodResolvable }) {
|
||||
</Stack>
|
||||
</Group>
|
||||
<Group sx={{ display: data.summary || data.parameters.length ? 'block' : 'none' }} mb="lg">
|
||||
{data.summary ? <CommentSection node={data.summary} /> : null}
|
||||
{data.summary ? <TSDoc node={data.summary} /> : null}
|
||||
{data.comment ? <TSDoc node={data.comment} /> : null}
|
||||
{data.parameters.length ? <ParameterTable data={data.parameters} /> : null}
|
||||
</Group>
|
||||
</Stack>
|
||||
|
||||
Reference in New Issue
Block a user