Skip to content

Commit

Permalink
Merge pull request #3000 from Autodesk/fix/input-focus-hover-state-order
Browse files Browse the repository at this point in the history
fix: focus styles take precedent over hover styles
  • Loading branch information
wmui51 authored Aug 30, 2023
2 parents ca833ad + 4943f79 commit 05e7a13
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ function borderBottomStyles(
...(error
? { borderBottomColor: themeData["input.error.borderBottomColor"] }
: {}),
...(hasFocus
? { borderBottomColor: themeData["input.line.focus.borderBottomColor"] }
: {}),
...(hasHover
? { borderBottomColor: themeData["input.box.hover.borderBottomColor"] }
: {}),
...(hasFocus
? { borderBottomColor: themeData["input.line.focus.borderBottomColor"] }
: {}),
};
}

Expand All @@ -70,8 +70,8 @@ function haloStyles({ isDisabled, hasFocus, hasHover }, themeData) {

return {
...defaults,
...(hasFocus ? focusStyles : {}),
...(hasHover ? hoverStyles : {}),
...(hasFocus ? focusStyles : {}),
};
}

Expand Down

0 comments on commit 05e7a13

Please sign in to comment.