Skip to content

Commit 77e7aab

Browse files
committed
feat(Code dependency): Use different links for files
1 parent cb75952 commit 77e7aab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/components/src/components/codeDependency/codeDependency.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,13 @@ export class CodeDependency {
5858
programmingLanguage?: string
5959

6060
public render() {
61+
const [href, target] =
62+
this.nodeKind === 'File' && this.label
63+
? [this.label, 'blank']
64+
: [`#${this.nodeId}`, '']
6165
return (
6266
<Host>
63-
<a href={`#${this.nodeId}`}>
67+
<a href={href} target={target}>
6468
<CodeExecuteStatus
6569
executeStatus={this.executeStatus}
6670
executeRequired={this.executeRequired}

0 commit comments

Comments
 (0)