mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
feat: add website documentation early mvp (#8183)
Co-authored-by: iCrawl <buechler.noel@outlook.com>
This commit is contained in:
19
packages/website/src/components/model/Interface.tsx
Normal file
19
packages/website/src/components/model/Interface.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
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}>
|
||||
<>
|
||||
{data.properties.length ? <PropertyList data={data.properties} /> : null}
|
||||
{data.methods.length ? <MethodList data={data.methods} /> : null}
|
||||
</>
|
||||
</DocContainer>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user