Skip to content

Commit 0ad44a3

Browse files
committed
Use VSCodeLink for links in header
1 parent 2cdded9 commit 0ad44a3

File tree

3 files changed

+17
-35
lines changed

3 files changed

+17
-35
lines changed

extensions/ql-vscode/src/view/variant-analysis/LinkButton.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

extensions/ql-vscode/src/view/variant-analysis/LinkIconButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { VSCodeLink } from '@vscode/webview-ui-toolkit/react';
12
import styled from 'styled-components';
2-
import { LinkButton } from './LinkButton';
33

4-
export const LinkIconButton = styled(LinkButton)`
4+
export const LinkIconButton = styled(VSCodeLink)`
55
svg {
66
margin-right: 0.3em;
77
}

extensions/ql-vscode/src/view/variant-analysis/VariantAnalysisHeader.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ const HeaderWrapper = styled.div`
2929
max-width: 100%;
3030
`;
3131

32+
const HeaderButtons = styled.div`
33+
display: flex;
34+
gap: 1em;
35+
`;
36+
3237
const ActionsWrapper = styled.div`
3338
margin-left: auto;
3439
display: flex;
@@ -53,14 +58,16 @@ export const VariantAnalysisHeader = ({
5358
<Wrapper>
5459
<HeaderWrapper>
5560
<ViewTitle>{queryName}</ViewTitle>
56-
<LinkIconButton onClick={onOpenQueryClick}>
57-
<FileCodeIcon size={16} />
58-
{queryFileName}
59-
</LinkIconButton>
60-
<LinkIconButton onClick={onViewQueryClick}>
61-
<CodeSquareIcon size={16} />
62-
View query
63-
</LinkIconButton>
61+
<HeaderButtons>
62+
<LinkIconButton onClick={onOpenQueryClick}>
63+
<FileCodeIcon size={16} />
64+
{queryFileName}
65+
</LinkIconButton>
66+
<LinkIconButton onClick={onViewQueryClick}>
67+
<CodeSquareIcon size={16} />
68+
View query
69+
</LinkIconButton>
70+
</HeaderButtons>
6471
</HeaderWrapper>
6572
<ActionsWrapper>
6673
{status === VariantAnalysisStatus.InProgress && (

0 commit comments

Comments
 (0)