Skip to content

Commit

Permalink
Small UI tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kicu committed Nov 25, 2024
1 parent 9d8c40e commit cad04e0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/Search/SearchPageHeaderInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,19 @@ function SearchPageHeaderInput({queryJSON, children}: SearchPageHeaderInputProps
}
: undefined;

const isHeaderInputActive = isAutocompleteListVisible && !!textInputValue;
const isHeaderInputActive = isAutocompleteListVisible;

// we need `- BORDER_WIDTH` to achieve the effect that the input will not "jump"
const popoverHorizontalPosition = 12 - BORDER_WIDTH;
const autocompleteInputStyle = isHeaderInputActive
? [styles.border, styles.pAbsolute, styles.pt2, {top: 8 - BORDER_WIDTH, left: popoverHorizontalPosition, right: popoverHorizontalPosition}, {boxShadow: variables.popoverMenuShadow}]
? [
styles.border,
styles.borderRadiusComponentLarge,
styles.pAbsolute,
styles.pt2,
{top: 8 - BORDER_WIDTH, left: popoverHorizontalPosition, right: popoverHorizontalPosition},
{boxShadow: variables.popoverMenuShadow},
]
: [styles.pt4];
const inputWrapperStyle = isHeaderInputActive ? styles.ph2 : null;

Expand Down

0 comments on commit cad04e0

Please sign in to comment.