Skip to content

Commit bebde7c

Browse files
committed
Tweak ActionButton styles and add comments
1 parent d59a84b commit bebde7c

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

extensions/ql-vscode/src/view/common/ActionButton/ActionButton.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* Styles have been copied from https://vscode-elements.github.io/elements-lite/components/action-button/configurator/ */
2+
13
.vscode-action-button {
24
align-items: center;
35
background-color: transparent;
@@ -38,6 +40,8 @@
3840

3941
.vscode-action-button:hover {
4042
background-color: var(--vscode-toolbar-hoverBackground);
43+
outline: 1px dotted var(--vscode-contrastActiveBorder);
44+
outline-offset: -1px;
4145
}
4246

4347
.vscode-action-button:active {

extensions/ql-vscode/src/view/common/ActionButton/ActionButton.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ import "./ActionButton.css";
33
// This is needed because vscode-elements/elements does not implement
44
// the same styles for icon buttons as vscode/webview-ui-toolkit
55
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6-
export const ActionButton = (props: any) => {
7-
return (
8-
<button type="button" className="vscode-action-button" {...props}>
9-
{props.children}
10-
</button>
11-
);
12-
};
6+
export const ActionButton = (props: any) => (
7+
<button type="button" {...props} className="vscode-action-button">
8+
{props.children}
9+
</button>
10+
);

0 commit comments

Comments
 (0)