feat(website): add extends clauses, enum members and automatic -types links (#8270)

* feat(website): add extends clauses, enum members and automatic -types links

* chore: remove vscode settings

* refactor: remove util file
This commit is contained in:
Suneet Tipirneni
2022-07-12 16:42:32 -04:00
committed by GitHub
parent 787654816d
commit 1ed605eaa4
21 changed files with 234 additions and 119 deletions

View File

@@ -0,0 +1,42 @@
import { MethodList } from './MethodList';
import { ParameterTable } from './ParameterTable';
import { PropertyList } from './PropertyList';
import { Section } from './Section';
import type { DocInterface } from '~/DocModel/DocInterface';
import type { ParameterDocumentation } from '~/util/parse.server';
export interface PropertiesSectionProps {
data: ReturnType<DocInterface['toJSON']>['properties'];
}
export function PropertiesSection({ data }: PropertiesSectionProps) {
return data.length ? (
<Section title="Properties">
<PropertyList data={data} />
</Section>
) : null;
}
export interface MethodsSectionProps {
data: ReturnType<DocInterface['toJSON']>['methods'];
}
export function MethodsSection({ data }: MethodsSectionProps) {
return data.length ? (
<Section title="Methods">
<MethodList data={data} />
</Section>
) : null;
}
export interface ParametersSectionProps {
data: ParameterDocumentation[];
}
export function ParametersSection({ data }: ParametersSectionProps) {
return data.length ? (
<Section title="Parameters">
<ParameterTable data={data} />
</Section>
) : null;
}