XeNote/components/ListItem.tsx

24 lines
613 B
TypeScript

import { Border } from "./Border";
import ExternalLinkIcon from "./ExternalLinkIcon";
export interface ListItemProps {
label: string
date?: string
url: string
}
export default function ListItem({ label, date, url }: ListItemProps) {
return (
<div className="cursor-pointer flex flex-row items-baseline justify-between gap-2">
<a href={url} target="_blank">
<p className="text-xs ">{label}</p>
</a>
<Border />
<div className="flex gap-1 items-baseline">
{!!date && <i className="text-xs">{date}</i>}
<ExternalLinkIcon />
</div>
</div>
)
}