diff --git a/src/components/TextArea/utils.test.ts b/src/components/TextArea/utils.test.ts index ae29eb4..339351f 100644 --- a/src/components/TextArea/utils.test.ts +++ b/src/components/TextArea/utils.test.ts @@ -317,7 +317,7 @@ describe('TextArea Utils', () => { expect(result).toBe('dangerKey'); }); - test('should return primaryKey when focused true', () => { + test('should return primaryKey when focused true and no error', () => { // given const focused = true; const errorState = false; diff --git a/src/components/TextArea/utils.ts b/src/components/TextArea/utils.ts index 9f1fd28..a85dcb9 100644 --- a/src/components/TextArea/utils.ts +++ b/src/components/TextArea/utils.ts @@ -91,5 +91,5 @@ export const getBorderColor = ({ focused: boolean; errorState: boolean; }) => { - return focused ? 'primaryKey' : errorState ? 'dangerKey' : 'neutralLighter'; + return errorState ? 'dangerKey' : focused ? 'primaryKey' : 'neutralLighter'; };