mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
* feat(website): add extends clauses, enum members and automatic -types links * chore: remove vscode settings * refactor: remove util file
29 lines
797 B
TypeScript
29 lines
797 B
TypeScript
import { CodeListing, CodeListingSeparatorType } from '../CodeListing';
|
|
import { DocContainer } from '../DocContainer';
|
|
import { Section } from '../Section';
|
|
import type { DocEnum } from '~/DocModel/DocEnum';
|
|
|
|
export interface EnumProps {
|
|
data: ReturnType<DocEnum['toJSON']>;
|
|
}
|
|
|
|
export function Enum({ data }: EnumProps) {
|
|
return (
|
|
<DocContainer name={data.name} kind={data.kind} excerpt={data.excerpt} summary={data.summary}>
|
|
<Section title="Members">
|
|
<div className="flex flex-col">
|
|
{data.members.map((member) => (
|
|
<CodeListing
|
|
key={member.name}
|
|
name={member.name}
|
|
separator={CodeListingSeparatorType.Value}
|
|
typeTokens={member.initializerTokens}
|
|
summary={member.summary}
|
|
/>
|
|
))}
|
|
</div>
|
|
</Section>
|
|
</DocContainer>
|
|
);
|
|
}
|