XeNote/components/ListItem.tsx

24 lines
613 B
TypeScript
Raw Normal View History

2024-01-01 03:10:16 +00:00
import { Border } from "./Border";
2023-12-29 06:03:35 +00:00
import ExternalLinkIcon from "./ExternalLinkIcon";
2023-12-30 16:42:21 +00:00
export interface ListItemProps {
label: string
2023-12-30 16:42:21 +00:00
date?: string
url: string
}
2023-12-30 16:42:21 +00:00
export default function ListItem({ label, date, url }: ListItemProps) {
2023-12-26 01:28:08 +00:00
return (
2024-01-01 03:10:16 +00:00
<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 />
2023-12-26 01:28:08 +00:00
<div className="flex gap-1 items-baseline">
2023-12-30 16:42:21 +00:00
{!!date && <i className="text-xs">{date}</i>}
2024-01-01 03:10:16 +00:00
<ExternalLinkIcon />
2023-12-26 01:28:08 +00:00
</div>
</div>
)
}