This will change all existing files to match Prettier formatting. The command used is `npm run format`.
30 lines
744 B
TypeScript
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;
|