fix(Function): Add link to source file (#9360)

This commit is contained in:
Jiralite 2023-04-10 13:00:03 +01:00 committed by GitHub
parent 1c8567f147
commit 774e23c572
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@ import { FunctionBody } from './FunctionBody';
const OverloadSwitcher = dynamic(async () => import('../../OverloadSwitcher'));
export function Function({ item }: { item: ApiFunction }) {
const header = <Header kind={item.kind} name={item.name} />;
const header = <Header kind={item.kind} name={item.name} sourceURL={item.sourceLocation.fileUrl} />;
if (item.getMergedSiblings().length > 1) {
const overloads = item
@ -23,7 +23,7 @@ export function Function({ item }: { item: ApiFunction }) {
return (
<div>
<Header kind={item.kind} name={item.name} />
{header}
<FunctionBody item={item} />
</div>
);