mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-16 19:05:54 -07:00
chore: initial public commit
This commit is contained in:
commit
fc9054b78c
250 changed files with 32809 additions and 0 deletions
23
client/app/components/SearchResultItem.tsx
Normal file
23
client/app/components/SearchResultItem.tsx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { Link } from "react-router"
|
||||
|
||||
interface Props {
|
||||
to: string
|
||||
onClick: React.MouseEventHandler<HTMLAnchorElement>
|
||||
img: string
|
||||
text: string
|
||||
subtext?: string
|
||||
}
|
||||
|
||||
export default function SearchResultItem(props: Props) {
|
||||
return (
|
||||
<Link to={props.to} className="px-3 py-2 flex gap-3 items-center hover:text-(--color-fg-secondary)" onClick={props.onClick}>
|
||||
<img src={props.img} alt={props.text} />
|
||||
<div>
|
||||
{props.text}
|
||||
{props.subtext ? <><br/>
|
||||
<span className="color-fg-secondary">{props.subtext}</span>
|
||||
</> : ''}
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue