wip event list item

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-02-15 00:35:13 +01:00
parent a1d5104166
commit f6c6a403b4
6 changed files with 277 additions and 56 deletions

View File

@@ -7,14 +7,14 @@ import { Button } from '../ui/button';
interface ExpandableListItemProps {
children: React.ReactNode;
bullets: React.ReactNode[];
content: React.ReactNode;
title: string;
image?: React.ReactNode;
initialOpen?: boolean;
}
export function ExpandableListItem({
title,
bullets,
content,
image,
initialOpen = false,
children,
@@ -22,15 +22,15 @@ export function ExpandableListItem({
const [open, setOpen] = useState(initialOpen ?? false);
return (
<div className="bg-white shadow rounded-xl overflow-hidden">
<div className="p-3 sm:p-6 flex gap-4 items-start">
<div className="p-3 sm:p-6 flex gap-4 items-center">
<div className="flex gap-1">{image}</div>
<div className="flex flex-col flex-1 gap-1 min-w-0">
<span className="text-lg font-medium leading-none mb-1">{title}</span>
<div className="flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-4 text-sm text-muted-foreground">
{bullets.map((bullet, index) => (
<span key={index}>{bullet}</span>
))}
</div>
{!!content && (
<div className="flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-4">
{content}
</div>
)}
</div>
<Button
variant="secondary"