mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
26 lines
679 B
TypeScript
26 lines
679 B
TypeScript
import { DocContainer } from '../DocContainer';
|
|
import { MethodList } from '../MethodList';
|
|
import { PropertyList } from '../PropertyList';
|
|
import type { DocInterface } from '~/DocModel/DocInterface';
|
|
|
|
export interface InterfaceProps {
|
|
data: ReturnType<DocInterface['toJSON']>;
|
|
}
|
|
|
|
export function Interface({ data }: InterfaceProps) {
|
|
return (
|
|
<DocContainer
|
|
name={data.name}
|
|
kind={data.kind}
|
|
excerpt={data.excerpt}
|
|
summary={data.summary}
|
|
typeParams={data.typeParameters}
|
|
>
|
|
<>
|
|
{data.properties.length ? <PropertyList data={data.properties} /> : null}
|
|
{data.methods.length ? <MethodList data={data.methods} /> : null}
|
|
</>
|
|
</DocContainer>
|
|
);
|
|
}
|