Skip to content

Commit

Permalink
fix: resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmch committed Sep 5, 2023
1 parent f28d7b2 commit 30eb07a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
23 changes: 7 additions & 16 deletions src/components/controls/TextArea/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ import type {
InputControlSize,
InputControlView,
} from '../types';
import {
CONTROL_ERROR_MESSAGE_QA,
errorPropsMapper,
getInputControlState,
prepareAutoComplete,
} from '../utils';
import {errorPropsMapper, getInputControlState, prepareAutoComplete} from '../utils';

import {TextAreaControl} from './TextAreaControl';

Expand Down Expand Up @@ -188,16 +183,12 @@ export const TextArea = React.forwardRef<HTMLSpanElement, TextAreaProps>(functio
/>
)}
</span>
{(isErrorMsgVisible || note) && (
<div className={b('outer-additional-content')}>
{isErrorMsgVisible && (
<div className={b('error')} data-qa={CONTROL_ERROR_MESSAGE_QA}>
{errorMessage}
</div>
)}
{note && <div className={b('note')}>{note}</div>}
</div>
)}
<OuterAdditionalContent
errorMessage={errorMessage}
errorMessageId={errorMessageId}
note={note}
noteId={noteId}
/>
</span>
);
});
6 changes: 3 additions & 3 deletions src/components/controls/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ export const TextInput = React.forwardRef<HTMLSpanElement, TextInputProps>(funct
</span>
<OuterAdditionalContent
note={note}
error={errorMessage}
isVisible={isErrorMsgVisible}
controlId={id}
errorMessage={errorMessage}
noteId={noteId}
errorMessageId={errorMessageId}
/>
</span>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';

import {block} from '../../../utils/cn';
import {CONTROL_ERROR_MESSAGE_QA} from '../../utils';

import './OuterAdditionalContent.scss';

Expand All @@ -22,7 +23,7 @@ export const OuterAdditionalContent = ({
return errorMessage || note ? (
<div className={b()}>
{errorMessage && (
<div className={b('error')} id={errorMessageId}>
<div className={b('error')} id={errorMessageId} data-qa={CONTROL_ERROR_MESSAGE_QA}>
{errorMessage}
</div>
)}
Expand Down

0 comments on commit 30eb07a

Please sign in to comment.