diff --git a/src/components/SearchBar/SearchBar.tsx b/src/components/SearchBar/SearchBar.tsx index a058e76f2..e10c8b79b 100644 --- a/src/components/SearchBar/SearchBar.tsx +++ b/src/components/SearchBar/SearchBar.tsx @@ -1,9 +1,19 @@ -import { TextInput, Text, Popover, Kbd, Group } from '@mantine/core'; +import { TextInput, Kbd, createStyles, useMantineTheme, Text, Popover } from '@mantine/core'; import { useForm, useHotkeys } from '@mantine/hooks'; import { useRef, useState } from 'react'; import { Search, BrandYoutube, Download } from 'tabler-icons-react'; import { useConfig } from '../../tools/state'; +const useStyles = createStyles((theme) => ({ + hide: { + [theme.fn.smallerThan('sm')]: { + display: 'none', + }, + display: 'flex', + alignItems: 'center', + }, +})); + export default function SearchBar(props: any) { const { config, setConfig } = useConfig(); const [opened, setOpened] = useState(false); @@ -12,8 +22,10 @@ export default function SearchBar(props: any) { const textInput: any = useRef(null); useHotkeys([['ctrl+K', () => textInput.current.focus()]]); + const { classes, cx } = useStyles(); + const theme = useMantineTheme(); const rightSection = ( -
+
Ctrl + K @@ -71,22 +83,19 @@ export default function SearchBar(props: any) { onFocusCapture={() => setOpened(true)} onBlurCapture={() => setOpened(false)} target={ - - - + } >