refactor: create and use Songs-Screen in sender

This commit is contained in:
robin committed 2026-07-27 14:43:44 +02:00
1 parent 1a0f2614f2
commit e51ff6e738
3 files changed
+68 -122

No files matched your search

+20 -12
View File
@@ -1,14 +1,22 @@
import { ReactNode } from "react";
import { ReactNode, ComponentPropsWithoutRef } from "react";
export default function Card({title, children}: {title: string, children: ReactNode}) {
return (
<section className="p-5 flex flex-col justify-between">
<h2 className="text-lg font-semibold mb-4 flex items-center gap-2">
{title}
</h2>
<div>
{children}
</div>
</section>
);
interface CardProps extends ComponentPropsWithoutRef<"section"> {
title: string;
children: ReactNode;
}
export default function Card({ title, children, className = "", ...props }: CardProps) {
return (
<section
className={`p-5 flex flex-col justify-between ${className}`}
{...props}
>
<h2 className="text-lg font-semibold mb-4 flex items-center gap-2">
{title}
</h2>
<div className="flex-1 min-h-0 flex flex-col">
{children}
</div>
</section>
);
}