Skip to content

Commit c316d52

Browse files
Set opacity to 40% when disabled
1 parent 9af0239 commit c316d52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import { styled } from "styled-components";
44

55
const DISABLED_VALUE = "-";
66

7-
const StyledDropdown = styled.select`
7+
const StyledDropdown = styled.select<{ disabled?: boolean }>`
88
width: 100%;
99
height: calc(var(--input-height) * 1px);
1010
background: var(--vscode-dropdown-background);
1111
color: var(--vscode-foreground);
1212
border: none;
1313
padding: 2px 6px 2px 8px;
14+
opacity: ${(props) =>
15+
props.disabled ? "var(--disabled-opacity)" : "inherit"};
1416
`;
1517

1618
type Props = {

0 commit comments

Comments
 (0)