Add responsive styles to header

This commit is contained in:
jeffvli 2022-12-25 02:29:00 -08:00
parent 7f62b583af
commit 7cc3adedc4
2 changed files with 19 additions and 7 deletions

View file

@ -20,6 +20,7 @@ export const SearchInput = ({
const mergedRef = useMergedRef<HTMLInputElement>(ref);
const isOpened = focused || ref.current?.value;
const showIcon = !isOpened || (openedWidth || 150) > 150;
useHotkeys([
[
@ -42,7 +43,7 @@ export const SearchInput = ({
<TextInput
ref={mergedRef}
{...props}
icon={<RiSearchLine size={15} />}
icon={showIcon && <RiSearchLine size={15} />}
styles={{
input: {
backgroundColor: isOpened ? 'inherit' : 'transparent !important',