|
| 1 | +import { |
| 2 | + ArrowDownIcon, |
| 3 | + ArrowTurnDownLeftIcon, |
| 4 | + ArrowUpIcon, |
| 5 | +} from '@heroicons/react/24/solid'; |
1 | 6 | import SearchModal from '@node-core/ui-components/Common/Search/Modal'; |
2 | 7 | import SearchResults from '@node-core/ui-components/Common/Search/Results'; |
3 | 8 | import SearchHit from '@node-core/ui-components/Common/Search/Results/Hit'; |
4 | 9 |
|
| 10 | +import styles from './index.module.css'; |
5 | 11 | import useOrama from '../../hooks/useOrama.mjs'; |
6 | 12 |
|
7 | 13 | const SearchBox = () => { |
8 | 14 | const client = useOrama(); |
9 | 15 |
|
10 | 16 | return ( |
11 | | - <SearchModal client={client} placeholder={'Start typing...'}> |
12 | | - <SearchResults |
13 | | - noResultsTitle={'No results found for'} |
14 | | - onHit={hit => <SearchHit document={hit.document} />} |
15 | | - /> |
| 17 | + <SearchModal client={client} placeholder="Start typing..."> |
| 18 | + <div className={styles.searchResultsContainer}> |
| 19 | + <SearchResults |
| 20 | + noResultsTitle="No results found for" |
| 21 | + onHit={hit => <SearchHit document={hit.document} />} |
| 22 | + /> |
| 23 | + </div> |
| 24 | + |
| 25 | + <div className={styles.footer}> |
| 26 | + <div className={styles.shortcutWrapper}> |
| 27 | + <div className={styles.shortcutItem}> |
| 28 | + <kbd className={styles.shortcutKey}> |
| 29 | + <ArrowTurnDownLeftIcon /> |
| 30 | + </kbd> |
| 31 | + <span className={styles.shortcutLabel}>to select</span> |
| 32 | + </div> |
| 33 | + |
| 34 | + <div className={styles.shortcutItem}> |
| 35 | + <kbd className={styles.shortcutKey}> |
| 36 | + <ArrowDownIcon /> |
| 37 | + </kbd> |
| 38 | + <kbd className={styles.shortcutKey}> |
| 39 | + <ArrowUpIcon /> |
| 40 | + </kbd> |
| 41 | + <span className={styles.shortcutLabel}>to navigate</span> |
| 42 | + </div> |
| 43 | + |
| 44 | + <div className={styles.shortcutItem}> |
| 45 | + <kbd className={styles.shortcutKey}>esc</kbd> |
| 46 | + <span className={styles.shortcutLabel}>to close</span> |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + </div> |
16 | 50 | </SearchModal> |
17 | 51 | ); |
18 | 52 | }; |
|
0 commit comments