Skip to content

Commit

Permalink
fix(textarea): bordercolor
Browse files Browse the repository at this point in the history
border color change on error state fixed
completed
  • Loading branch information
yakupozbaydar committed Mar 23, 2024
1 parent 330dff7 commit 4d979d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/TextArea/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextArea/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ export const getBorderColor = ({
focused: boolean;
errorState: boolean;
}) => {
return focused ? 'primaryKey' : errorState ? 'dangerKey' : 'neutralLighter';
return errorState ? 'dangerKey' : focused ? 'primaryKey' : 'neutralLighter';
};

0 comments on commit 4d979d2

Please sign in to comment.