feat(website): add detailed property and method documentation (#8252)

Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
Suneet Tipirneni
2022-07-08 16:03:18 -04:00
committed by GitHub
parent feb3bdda0a
commit 33ae7df000
18 changed files with 241 additions and 104 deletions

View 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>
);
}