mirror of https://github.com/gabehf/Koito.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
653 B
23 lines
653 B
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>
|
|
)
|
|
} |