Skip to content

Commit

Permalink
change condition for input style when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMarcMilletScality committed Dec 10, 2024
1 parent 05d0ace commit 761cfe7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/lib/components/inputv2/inputv2.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { forwardRef, InputHTMLAttributes } from 'react';
import styled from 'styled-components';
import styled, { css } from 'styled-components';
import { spacing } from '../../spacing';
import { DESCRIPTION_PREFIX, useFieldContext } from '../form/Form.component';
import { Icon, IconName } from '../icon/Icon.component';
Expand Down Expand Up @@ -62,12 +62,12 @@ const InputContainer = styled.div<{
background: ${(props) => props.theme.backgroundLevel1};
border-radius: ${spacing.r4};
${(props) =>
props.isContextAvailable &&
props.disabled &&
`
opacity: 0.5;
cursor: not-allowed;
`}
props.disabled
? css`
opacity: 0.5;
cursor: not-allowed;
`
: ''}
`;

const InputBorder = styled.div<{
Expand Down

0 comments on commit 761cfe7

Please sign in to comment.