/[sudobot]/trunk/docs/components/Searching/SearchResult.tsx
ViewVC logotype

Contents of /trunk/docs/components/Searching/SearchResult.tsx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 575 - (show annotations)
Mon Jul 29 17:59:26 2024 UTC (8 months ago) by rakinar2
File MIME type: application/typescript
File size: 811 byte(s)
chore: add trunk
1 import Link from "@/components/Navigation/Link";
2 import { SearchResultItem } from "./SearchModal";
3
4 type SearchResultProps = {
5 result: SearchResultItem;
6 query: string;
7 onClick: () => void;
8 };
9
10 function SearchResult({ result, query, onClick }: SearchResultProps) {
11 return (
12 <Link
13 href={result.url}
14 onClick={onClick}
15 className="p-2 shadow-[0_0_1px_1px_rgba(255,255,255,0.1)] block rounded my-2 bg-[rgba(0,0,0,0.2)] hover:bg-[rgba(0,0,0,0.3)]"
16 >
17 <h3 className="text-lg lg:text-xl">{result.title}</h3>
18
19 <p className="text-[#999]">
20 May include information related to{" "}
21 <strong className="text-white">{query}</strong>
22 </p>
23 </Link>
24 );
25 }
26
27 export default SearchResult;

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26