mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
feat(website): add detailed property and method documentation (#8252)
Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
19
packages/website/src/components/PropertyItem.tsx
Normal file
19
packages/website/src/components/PropertyItem.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { DocProperty } from '~/DocModel/DocProperty';
|
||||
import { constructHyperlinkedText } from '~/util/util';
|
||||
|
||||
export interface PropertyItemProps {
|
||||
data: ReturnType<DocProperty['toJSON']>;
|
||||
}
|
||||
|
||||
export function PropertyItem({ data }: PropertyItemProps) {
|
||||
return (
|
||||
<div className="flex flex-col mb-2 ml-3">
|
||||
<div className="w-full flex flex-row">
|
||||
<h4 className="font-mono my-0">{`${data.name}`}</h4>
|
||||
<h4 className="mx-3 my-0">:</h4>
|
||||
<h4 className="font-mono color-blue-800 my-0">{constructHyperlinkedText(data.propertyTypeTokens)}</h4>
|
||||
</div>
|
||||
{data.summary && <p className="color-slate-500 mt-2">{data.summary}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user