mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-16 10:55:55 -07:00
chore: initial public commit
This commit is contained in:
commit
fc9054b78c
250 changed files with 32809 additions and 0 deletions
31
client/app/components/SearchResultSelectorItem.tsx
Normal file
31
client/app/components/SearchResultSelectorItem.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { Check } from "lucide-react"
|
||||
import CheckCircleIcon from "./icons/CheckCircleIcon"
|
||||
|
||||
interface Props {
|
||||
id: number
|
||||
onClick: React.MouseEventHandler<HTMLButtonElement>
|
||||
img: string
|
||||
text: string
|
||||
subtext?: string
|
||||
active: boolean
|
||||
}
|
||||
|
||||
export default function SearchResultSelectorItem(props: Props) {
|
||||
return (
|
||||
<button className="px-3 py-2 flex gap-3 items-center hover:text-(--color-fg-secondary) hover:cursor-pointer w-full" style={{ border: props.active ? "1px solid var(--color-fg-tertiary" : ''}} onClick={props.onClick}>
|
||||
<img src={props.img} alt={props.text} />
|
||||
<div className="flex justify-between items-center w-full">
|
||||
<div className="flex flex-col items-start text-start">
|
||||
{props.text}
|
||||
{props.subtext ? <><br/>
|
||||
<span className="color-fg-secondary">{props.subtext}</span>
|
||||
</> : ''}
|
||||
</div>
|
||||
{
|
||||
props.active ?
|
||||
<div className="px-2"><Check size={24} /></div> : ''
|
||||
}
|
||||
</div>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue