mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
refactor(website): font loading and reduce cls
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import type { ApiEnum } from '@microsoft/api-extractor-model';
|
||||
import { VscSymbolEnum } from '@react-icons/all-files/vsc/VscSymbolEnum';
|
||||
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';
|
||||
import { Panel } from '~/components/Panel';
|
||||
import { ObjectHeader } from '~/components/documentation/ObjectHeader';
|
||||
import { DocumentationSection } from '~/components/documentation/section/DocumentationSection';
|
||||
import { SummarySection } from '~/components/documentation/section/SummarySection';
|
||||
|
||||
export function Enum({ item }: { item: ApiEnum }) {
|
||||
return (
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { ApiEnumMember } from '@microsoft/api-extractor-model';
|
||||
import { Anchor } from '~/components/Anchor';
|
||||
import { NameText } from '~/components/NameText';
|
||||
import { SignatureText } from '~/components/SignatureText';
|
||||
import { TSDoc } from '~/components/documentation/tsdoc/TSDoc';
|
||||
import { Anchor } from '../../Anchor';
|
||||
import { NameText } from '../../NameText';
|
||||
import { SignatureText } from '../../SignatureText';
|
||||
import { TSDoc } from '../../documentation/tsdoc/TSDoc';
|
||||
|
||||
export function EnumMember({ member }: { member: ApiEnumMember }) {
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ApiFunction } from '@microsoft/api-extractor-model';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { Header } from '../../documentation/Header';
|
||||
import { FunctionBody } from './FunctionBody';
|
||||
import { Header } from '~/components/documentation/Header';
|
||||
|
||||
const OverloadSwitcher = dynamic(async () => import('../../OverloadSwitcher'));
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { ApiFunction } from '@microsoft/api-extractor-model';
|
||||
import { SyntaxHighlighter } from '~/components/SyntaxHighlighter';
|
||||
import { Documentation } from '~/components/documentation/Documentation';
|
||||
import { ParameterSection } from '~/components/documentation/section/ParametersSection';
|
||||
import { SummarySection } from '~/components/documentation/section/SummarySection';
|
||||
import { TypeParameterSection } from '~/components/documentation/section/TypeParametersSection';
|
||||
import { SyntaxHighlighter } from '../../SyntaxHighlighter';
|
||||
import { Documentation } from '../../documentation/Documentation';
|
||||
import { ParameterSection } from '../../documentation/section/ParametersSection';
|
||||
import { SummarySection } from '../../documentation/section/SummarySection';
|
||||
import { TypeParameterSection } from '../../documentation/section/TypeParametersSection';
|
||||
|
||||
export interface FunctionBodyProps {
|
||||
mergedSiblingCount: number;
|
||||
|
||||
@@ -4,18 +4,16 @@ import type {
|
||||
ApiMethod,
|
||||
ApiMethodSignature,
|
||||
} from '@microsoft/api-extractor-model';
|
||||
import type { DocSection } from '@microsoft/tsdoc';
|
||||
import { InheritanceText } from '~/components/InheritanceText';
|
||||
import { ParameterTable } from '~/components/ParameterTable';
|
||||
import { TSDoc } from '~/components/documentation/tsdoc/TSDoc';
|
||||
import { InheritanceText } from '../../InheritanceText';
|
||||
import { ParameterTable } from '../../ParameterTable';
|
||||
import { TSDoc } from '../../documentation/tsdoc/TSDoc';
|
||||
|
||||
export interface MethodDocumentationProps {
|
||||
fallbackSummary?: DocSection;
|
||||
inheritedFrom?: (ApiDeclaredItem & ApiItemContainerMixin) | undefined;
|
||||
method: ApiMethod | ApiMethodSignature;
|
||||
}
|
||||
|
||||
export function MethodDocumentation({ method, fallbackSummary, inheritedFrom }: MethodDocumentationProps) {
|
||||
export function MethodDocumentation({ method, inheritedFrom }: MethodDocumentationProps) {
|
||||
const parent = method.parent as ApiDeclaredItem;
|
||||
|
||||
if (!(method.tsdocComment?.summarySection || method.parameters.length > 0)) {
|
||||
|
||||
Reference in New Issue
Block a user