Skip to content

Commit a6ccfe4

Browse files
Elena Rashkovanlena.rashkovan
andauthored
fix(field): fix disabled state (#546)
Co-authored-by: lena.rashkovan <[email protected]>
1 parent f7c4400 commit a6ccfe4

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/components/experimental/Field/FakeInput.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,10 @@ export const FakeInput = styled.div<{ $isVisuallyFocused: boolean }>`
5050
border-color: ${getSemanticValue('negative')};
5151
}
5252
53+
[data-disabled] & {
54+
opacity: 0.38;
55+
pointer-events: none;
56+
}
57+
5358
${props => props.$isVisuallyFocused && focusStyles}
5459
`;
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
import styled from 'styled-components';
22
import { get } from '../../../utils/experimental/themeGet';
3-
import { FakeInput } from './FakeInput';
43

54
export const Wrapper = styled.div`
65
padding: ${get('space.2')} 0;
7-
8-
&:has(input[data-disabled]) {
9-
opacity: 0.38;
10-
11-
${FakeInput} {
12-
pointer-events: none;
13-
}
14-
}
156
`;

0 commit comments

Comments
 (0)