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

View File

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