Skip to content

Commit

Permalink
Merge pull request #66 from yakupozbaydar/error-border-fix
Browse files Browse the repository at this point in the history
fix(textarea): bordercolor
  • Loading branch information
pinarkizilarslan authored Nov 29, 2024
2 parents 0d5b0cf + 4d979d2 commit 06bb51e
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 06bb51e

Please sign in to comment.