mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
Add responsive styles to header
This commit is contained in:
parent
7f62b583af
commit
7cc3adedc4
2 changed files with 19 additions and 7 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue