Files
vscode-codeql/extensions/ql-vscode/src/view/remote-queries/RepoListCopyButton.tsx
Koen Vlaswinkel ebcdf8ad0b Run Prettier on all files
This will change all existing files to match Prettier formatting.

The command used is `npm run format`.
2022-11-16 19:06:13 +01:00

30 lines
744 B
TypeScript

import * as React from "react";
import { vscode } from "../vscode-api";
import { RemoteQueryResult } from "../../remote-queries/shared/remote-query-result";
import { CopyIcon } from "@primer/octicons-react";
import { IconButton } from "@primer/react";
const copyRepositoryList = (queryResult: RemoteQueryResult) => {
vscode.postMessage({
t: "copyRepoList",
queryId: queryResult.queryId,
});
};
const RepoListCopyButton = ({
queryResult,
}: {
queryResult: RemoteQueryResult;
}) => (
<IconButton
aria-label="Copy repository list"
icon={CopyIcon}
variant="invisible"
size="small"
sx={{ "text-align": "right" }}
onClick={() => copyRepositoryList(queryResult)}
/>
);
export default RepoListCopyButton;