diff --git a/components/SearchBar/SearchBar.tsx b/components/SearchBar/SearchBar.tsx new file mode 100644 index 000000000..aa852b8b6 --- /dev/null +++ b/components/SearchBar/SearchBar.tsx @@ -0,0 +1,41 @@ +import { Input, TextInput, Text, ActionIcon, useMantineTheme } from '@mantine/core'; +import { showNotification } from '@mantine/notifications'; +import { useState, useEffect } from 'react'; +import { Search, ArrowRight, ArrowLeft } from 'tabler-icons-react'; +import { Config, loadConfig } from '../../tools/config'; + +export default function SearchBar(props: any) { + const theme = useMantineTheme(); + const [config, setConfig] = useState({ + searchBar: true, + }); + + useEffect(() => { + const config = loadConfig('settings'); + if (config) { + showNotification({ + autoClose: 1000, + title: Config loaded, + message: undefined, + }); + setConfig(config); + } + }, []); + return ( + } + radius="xl" + size="md" + placeholder="Search the web" + onChange={(e) => { + showNotification({ + autoClose: 1000, + title: Searching for {e.target.value}, + message: undefined, + }); + }} + rightSectionWidth={42} + {...props} + /> + ); +}