1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import React from "react"; import { postVscMessage } from "../vscode"; function VS CodeFileLink(props: { path: string; text?: string }) { return ( <a href={`file://${props.path}`} onClick={() => { postVscMessage("openFile", { path: props.path }); }} > {props.text || props.path} </a> ); } export default VS CodeFileLink;