We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46d55c8 commit 35b7b0fCopy full SHA for 35b7b0f
frontend/src/components/search-bar.js
@@ -0,0 +1,22 @@
1
+import { MagnifyingGlassIcon } from '@heroicons/react/24/outline';
2
+
3
+export default function SearchBar({ onChange, disabled }) {
4
+ return (
5
+ <div className="grow">
6
+ <label htmlFor="default-search" className="pt-2 text-sm font-medium sr-only">Search</label>
7
+ <div className="relative">
8
+ <div className="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
9
+ <MagnifyingGlassIcon className='w-4 h-4 text-gray-500' />
10
+ </div>
11
+ <input
12
+ onChange={onChange}
13
+ type="search"
14
+ id="default-search"
15
+ className="input w-full max-w-md pl-8 h-12 rounded-lg border"
16
+ placeholder="Search for a course..."
17
+ disabled={disabled}
18
+ />
19
20
21
+ );
22
+}
0 commit comments