mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
refactor(website): redesign (#9286)
This commit is contained in:
@@ -22,7 +22,7 @@ export function Class({ clazz }: { clazz: ApiClass }) {
|
||||
{clazz.typeParameters.length ? <TypeParameterSection item={clazz} /> : null}
|
||||
{constructor ? <ConstructorSection item={constructor} /> : null}
|
||||
<Members item={clazz} />
|
||||
<Outline members={serializeMembers(clazz)} />
|
||||
{/* <Outline members={serializeMembers(clazz)} /> */}
|
||||
</Documentation>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ export function Interface({ item }: { item: ApiInterface }) {
|
||||
<HierarchyText item={item} type="Extends" />
|
||||
{item.typeParameters.length ? <TypeParameterSection item={item} /> : null}
|
||||
<Members item={item} />
|
||||
<Outline members={serializeMembers(item)} />
|
||||
{/* <Outline members={serializeMembers(item)} /> */}
|
||||
</Documentation>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import type { ApiVariable } from '@microsoft/api-extractor-model';
|
||||
import { Documentation } from '../documentation/Documentation';
|
||||
import { ObjectHeader } from '../documentation/ObjectHeader';
|
||||
import { SummarySection } from '../documentation/section/SummarySection';
|
||||
|
||||
export function Variable({ item }: { item: ApiVariable }) {
|
||||
return (
|
||||
<Documentation>
|
||||
<ObjectHeader item={item} />
|
||||
<SummarySection item={item} />
|
||||
</Documentation>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,14 +4,12 @@ import { Panel } from '../../Panel';
|
||||
import { Documentation } from '../../documentation/Documentation';
|
||||
import { ObjectHeader } from '../../documentation/ObjectHeader';
|
||||
import { DocumentationSection } from '../../documentation/section/DocumentationSection';
|
||||
import { SummarySection } from '../../documentation/section/SummarySection';
|
||||
import { EnumMember } from './EnumMember';
|
||||
|
||||
export function Enum({ item }: { item: ApiEnum }) {
|
||||
return (
|
||||
<Documentation>
|
||||
<ObjectHeader item={item} />
|
||||
<SummarySection item={item} />
|
||||
<DocumentationSection icon={<VscSymbolEnum size={20} />} padded title="Members">
|
||||
<div className="flex flex-col gap-4">
|
||||
{item.members.map((member, idx) => (
|
||||
|
||||
@@ -26,12 +26,11 @@ export function MethodHeader({ method }: { method: ApiMethod | ApiMethodSignatur
|
||||
|
||||
return (
|
||||
<div className="scroll-mt-30 flex flex-col" id={key}>
|
||||
<div className="flex flex-col gap-2 md:-ml-9 md:flex-row md:place-items-center">
|
||||
<Anchor href={`#${key}`} />
|
||||
<div className="flex flex-col gap-2 md:-ml-9">
|
||||
{isDeprecated ||
|
||||
(method.kind === ApiItemKind.Method && (method as ApiMethod).isProtected) ||
|
||||
(method.kind === ApiItemKind.Method && (method as ApiMethod).isStatic) ? (
|
||||
<div className="flex flex-row gap-1">
|
||||
<div className="flex flex-row gap-1 md:ml-7">
|
||||
{isDeprecated ? (
|
||||
<div className="flex h-5 flex-row place-content-center place-items-center rounded-full bg-red-500 px-3 text-center text-xs font-semibold uppercase text-white">
|
||||
Deprecated
|
||||
@@ -49,7 +48,8 @@ export function MethodHeader({ method }: { method: ApiMethod | ApiMethodSignatur
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
<div className="flex flex-row flex-wrap gap-1">
|
||||
<div className="flex flex-row flex-wrap place-items-center gap-1">
|
||||
<Anchor href={`#${key}`} />
|
||||
<h4 className="break-all font-mono text-lg font-bold">{getShorthandName(method)}</h4>
|
||||
<h4 className="font-mono text-lg font-bold">:</h4>
|
||||
<h4 className="break-all font-mono text-lg font-bold">
|
||||
|
||||
Reference in New Issue
Block a user